For a specialized application, I need to add new event classes to the
browser's JS context, and I want to make them subclasses of the
DOM-defined Event and UIEvent classes. However, I'm not sure how to do
this. The JSClassDefinition struct has a parentClass member, but I
don't see anything in the API that allows me to look up an existing
JSClassRef.
The closest I can think to do is to get the global object from the
JSContextRef, look up the class name as a property, and then get the
class' prototype, but I'm not sure where to go from there (or even if
that's a workable approach).
The idea is to hook into the WebKitWebView::window-object-cleared signal
(I'm using webkit-gtk) and add the new classes to the passed
JSGlobalContextRef.
Any ideas? Is this even possible to do with the public JavaScriptCore API?
Thanks,
Brian
_______________________________________________
webkit-help mailing list
webkit-help@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help