internal JSValue Call(JSContext Scope, JSValue ThisObj, JSValue fncObject, JSArgs Args) { JSFunctionContext ctx = new JSFunctionContext(ThisObj, Args, this.ParameterList, Scope, ((JSFunctionObject) fncObject).Scope); ctx.Source = this.Source; if (this.Name != "[function]") { ctx.LexicalEnv.CreateMutableBinding(this.Name); ctx.LexicalEnv.SetMutableBinding(this.Name, fncObject); } return this._delegate(ctx); }
public override JSValue Call(JSContext Scope, JSValue ThisObj, JSArgs Args) { if (ThisObj.CheckCoercible()) { ThisObj = ThisObj.ToJSObject(); } else { ThisObj = JSContext.CurrentGlobalContext.Global; } JSFunctionContext ctx = new JSFunctionContext(ThisObj, Args, new ParameterList(this.def.param_names), Scope, this.Scope); return(this.def.del(ctx)); }
public override JSValue Call(JSContext Scope, JSValue ThisObj, JSArgs Args) { if (ThisObj.CheckCoercible()) { ThisObj = ThisObj.ToJSObject(); } else { ThisObj = JSContext.CurrentGlobalContext.Global; } JSFunctionContext ctx = new JSFunctionContext(ThisObj, Args, new ParameterList(this.def.param_names), Scope, this.Scope); return this.def.del(ctx); }