En 02/05/13 02:59, Eric Gregory escribiu: > On Wed, May 1, 2013 at 5:41 PM, Martin Robinson > <martin.james.robin...@gmail.com > <mailto:martin.james.robin...@gmail.com>> wrote: > > > A WebPage corresponds to a WebView, but on the WebProcess side. The C > API exposes frames, but we have not exposed them in the GObject API > because we aren't sure if they will continue to be part of the > internal UIProcess API. That decision is really up to the Apple > developers -- who have said in the past they were thinking of ditching > them entirely. > > I think what Niranjan is trying to accomplish should be possible with > a combination of user scripts (which can be injected into all frames) > and the injection of native JavaScript methods into the DOM. We hope > to add both of these things to a future release. > > > Wait, are you saying the C-based DOM API *is* going away?
This was already explained during the 2.x development process. In the new multiprocess architecture, the DOM tree lives in the WebProcess while your application is the UIProcess. Synchronous communication between both (as DOM bindings will require) is not (generally) allowed between these two processes because they must not block. Apple for example decided to reimplement for Safari all the use cases where they used their DOM bindings. Said that, it's still possible to access the DOM :-). The solution is the new WebExtensions API developed for 2.x series. You'd basically have to define a extension (kind of a plugin) that will be loaded by the WebProcess (so it can directly access the DOM) and that could talk back to your application using D-Bus or whatever method you like. Check for example ephy-web-extension.c [1] in the epiphany source code which implements the "save passwords from form" feature among others. BR [1] https://git.gnome.org/browse/epiphany/tree/embed/web-extension/ephy-web-extension.c _______________________________________________ webkit-gtk mailing list webkit-gtk@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-gtk