Working example for C++ <-> v8 binding -- Finally

38 views
Skip to first unread message

kent williams

unread,
Jan 9, 2017, 4:44:12 PM1/9/17
to v8-users
It took some thinking and an overseas vacation over Christmas to figure it out but here is what I came up with:

https://gist.github.com/Chaircrusher/48d53ee78567ca213f7a858e91e4771d

The problems I was having.-- I think -- was just getting things in the right order; initializing the object template properly before getting an instance of the object to set in the Global.

Also, I was passing in a v8::Global already created into my class initialization, rather than calling v8::Context::Global() to set the object instance in the global prototype.

At any rate I will keep this gist up to date if I upgrade to more current V8 versions than I'm currently using.
Reply all
Reply to author
Forward
0 new messages