News for hackers. Stuff that matters.
Re:How to roll out your own Javascript API with V8 by pmjordan on Friday April 29, 2011 @11:09AM (#2497610)
For embedding a web page display, you're probably best off looking at Webkit/Gecko wrappers for whatever UI toolkit you're using. Getting an image out of the renderer itself is one thing, but tying it into the surrounding windowing environment (using the platform's native widgets, responding to input, etc.) is less trivial. Fortunately, this work has usually already been done for you, and you'll find toolkit-specific documentation on embedding.

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...

[4] http://webkitgtk.org/

Re:How to roll out your own Javascript API with V8 by palish on Friday April 29, 2011 @01:55PM (#2498302)
Thanks for the info. However, what I really want is a simple "here is how to render a webpage with webkit" tutorial.

(FYI I would be using .NET WinForms, so I doubt there's much open-source love.)

Re:How to roll out your own Javascript API with V8 by mullr on Saturday April 30, 2011 @10:08AM (#2500645)
When faced with this problem, I used the Qt port of webkit (QtWebkit) to make an ActiveX control which I can use from windows forms. It doesn't work instantly out of the box, but with a bit of massaging you can probably get what you want.

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.

Re:How to roll out your own Javascript API with V8 by pmjordan on Saturday April 30, 2011 @06:52AM (#2500392)
For reasons given above, such a tutorial would necessarily have to be specific to whatever you're trying to embed it in, or maybe at a raw framebuffer level (which isn't terribly useful unless you really are working at that level). Otherwise it'd be huge and different parts of it would not be useful to most people.

With that in mind - third Google result for 'embedding webkit in winforms':

http://aautar.digital-radiation.com/blog/?p=1327