On Tue, Apr 23, 2013 at 5:42 PM, Mike Moening <mike.moen...@gmail.com> wrote: > If I use the FunctionTemplate instead of the ObjectTemplate I can't seem to > get a constructor callback to work. > > funcTemplate->InstanceTemplate()->SetCallAsFunctionHandler(ctorCallback);
Why would you use SetCallAsFunctionHandler() here? You're presumably creating the constructor in C++ land so why not use this instead? Local<FunctionTemplate> funcTemplate = FunctionTemplate::New(ctorCallback); // Now manipulate the instance or prototype template > When the script does this: > var o = new MyObject(); > > The C++ ctorCallback is never called! > > Why doesn't the ObjectTemplate have a HasInstance() method? > > There has to be an example of passing wrapped objects to methods of other > wrapped objects.. -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.