internal static object NewWithSpecial(Context cx, IScriptable scope, object [] args) { ScriptRuntime.checkDeprecated(cx, "With"); scope = ScriptableObject.GetTopLevelScope(scope); BuiltinWith thisObj = new BuiltinWith(); thisObj.SetPrototype(args.Length == 0 ? ScriptableObject.getClassPrototype(scope, "Object") : ScriptConvert.ToObject(cx, scope, args [0])); thisObj.ParentScope = scope; return(thisObj); }
internal static void Init (IScriptable scope, bool zealed) { BuiltinWith obj = new BuiltinWith (); obj.ParentScope = scope; obj.SetPrototype (ScriptableObject.GetObjectPrototype (scope)); IdFunctionObject ctor = new IdFunctionObject (obj, FTAG, Id_constructor, "With", 0, scope); ctor.MarkAsConstructor (obj); if (zealed) { ctor.SealObject (); } ctor.ExportAsScopeProperty (); }
internal static void Init(IScriptable scope, bool zealed) { BuiltinWith obj = new BuiltinWith(); obj.ParentScope = scope; obj.SetPrototype(ScriptableObject.GetObjectPrototype(scope)); IdFunctionObject ctor = new IdFunctionObject(obj, FTAG, Id_constructor, "With", 0, scope); ctor.MarkAsConstructor(obj); if (zealed) { ctor.SealObject(); } ctor.ExportAsScopeProperty(); }
internal static object NewWithSpecial(Context cx, IScriptable scope, object [] args) { ScriptRuntime.checkDeprecated (cx, "With"); scope = ScriptableObject.GetTopLevelScope (scope); BuiltinWith thisObj = new BuiltinWith (); thisObj.SetPrototype (args.Length == 0 ? ScriptableObject.getClassPrototype (scope, "Object") : ScriptConvert.ToObject (cx, scope, args [0])); thisObj.ParentScope = scope; return thisObj; }