public JsFunction New <T>(Func <T, JsInstance> impl) { JsFunction function = new ClrImplDefinition <T>(impl, PrototypeProperty); function.PrototypeProperty = Global.ObjectClass.New(function); //function.Scope = new JsScope(PrototypeProperty); return(function); }
public JsFunction New <T>(JintFunc <T, JsInstance[], JsInstance> impl, int length) where T : JsInstance { JsFunction function = new ClrImplDefinition <T>(impl, length, PrototypeProperty); function.PrototypeProperty = Global.ObjectClass.New(function); //function.Scope = new JsScope(PrototypeProperty); return(function); }
public JsFunction New <T>(Func <T, JsInstance[], JsInstance> impl, int length) where T : JsInstance { JsFunction function = new ClrImplDefinition <T>(impl, length); function.Prototype = Global.ObjectClass.New(function); function.Scope.Prototype = Prototype; return(function); }