internal static void Init (IScriptable scope, bool zealed)
 {
     BuiltinMath obj = new BuiltinMath ();
     obj.ActivatePrototypeMap (MAX_ID);
     obj.SetPrototype (GetObjectPrototype (scope));
     obj.ParentScope = scope;
     if (zealed) {
         obj.SealObject ();
     }
     ScriptableObject.DefineProperty (scope, "Math", obj, ScriptableObject.DONTENUM
         | ScriptableObject.READONLY | ScriptableObject.PERMANENT);
 }
Example #2
0
        internal static void Init(IScriptable scope, bool zealed)
        {
            BuiltinMath obj = new BuiltinMath();

            obj.ActivatePrototypeMap(MAX_ID);
            obj.SetPrototype(GetObjectPrototype(scope));
            obj.ParentScope = scope;
            if (zealed)
            {
                obj.SealObject();
            }
            ScriptableObject.DefineProperty(scope, "Math", obj, ScriptableObject.DONTENUM
                                            | ScriptableObject.READONLY | ScriptableObject.PERMANENT);
        }