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);
 }
Пример #2
0
        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));
        }
Пример #3
0
 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);
 }