[webkit-help] webkit 2 queries

Adam Roben aroben at apple.com
Tue Apr 26 12:52:55 PDT 2011

On Apr 26, 2011, at 11:36 AM, Ammar Ahmad Awan wrote:

> WebView knows how to render SVG content but I want to
> pro-grammatically create SVG elements such as a Circle or Rectangle
> based on user input for some parameters, and draw them on the Window.
> Then handle events for that window, such as "if a user clicks inside a
> circle, some text is displayed on the window".
> For this, I thought of using WebCore's SVG implementation rather than
> writing my own specs in C++ for SVG. I am not sure if that is possible
> or not.

I think the best way to do this is to write the code that creates and manipulates SVG elements in JavaScript. You'd write some JavaScript that you'd load into the page (either using a script tag or using the JavaScriptCore APIs). If needed, your C++ code can call into JavaScript, and vice-versa. Or maybe you'll be able to write your whole UI in HTML and JavaScript.


More information about the webkit-help mailing list