Example #1
0
 public JSFunction (JSContext context, string name, JSFunctionHandler handler) : base (context, IntPtr.Zero)
 {
     this.handler = handler;
     var native_name = JSString.New (name);
     Raw = JSObjectMakeFunctionWithCallback (context.Raw, native_name,
         native_callback = new JSObject.CallAsFunctionCallback (JSCallback));
     native_name.Release ();
 }
        public JSFunction(JSContext context, string name, JSFunctionHandler handler) : base(context, IntPtr.Zero)
        {
            this.handler = handler;
            var native_name = JSString.New(name);

            Raw = JSObjectMakeFunctionWithCallback(context.Raw, native_name,
                                                   native_callback = new JSObject.CallAsFunctionCallback(JSCallback));
            native_name.Release();
        }