How to roll out your own Javascript API with V8
syskall.com
syskall.com
Offtopic: I have always wanted a tutorial for "Here is how to embed WebKit into your C++ application" (to make your own toy web browser). I realize rendering a webpage is only one very tiny component of a browser, but it's such an interesting one that I wish someone would put together a tutorial on how to do that.
For example, for WebKit there is Cocoa/Carbon integration[1], Cocoa Touch integration [2], KDE & Qt integration [3], GTK [4], etc. You can probably find others very easily, likewise for Gecko.
[1] http://developer.apple.com/library/mac/#documentation/Cocoa/...
[2] http://developer.apple.com/library/ios/#documentation/uikit/...
[3] http://api.kde.org/4.5-api/kdelibs-apidocs/kdewebkit/html/in...
(FYI I would be using .NET WinForms, so I doubt there's much open-source love.)
With that in mind - third Google result for 'embedding webkit in winforms':
Cool bonus feature: you can mark any objects you want to expose to the browser via javascript with the COM interop attribute and send them over to your homebrewed browser control. Qt's COM interop layer turns translates the Qt flavor of dynamic dispatch calls into IDispatch calls. So it works pretty seamlessly.
https://github.com/olalonde/node-notify
Also available through NPM:
npm install notifyhttps://github.com/pmj/node-method-wrapper
It too is still work in progress, but it works pretty well so far. Note that it currently superficially relies on some node-specific extensions, though they should be pretty easy to remove, in order to use it with V8 alone.