El sáb, 25-06-2016 a las 16:18 -0500, Michael Catanzaro escribió: > On Sat, 2016-06-25 at 17:50 +0200, Jay Strict wrote: > > I assume, as of [3], that I have to implement a WebExtension > > No, that won't do you any good; the networking code lives in the > network process, not the web process.
But parsing happens in the web process, and requests are build and sent form the web process to the network process. So, the answer is yes, you need a web extension, and the API you want is the signal WebKitWebPage::send-request. That signal is emitted right after the request is created and before it's sent to the network process, so that you can modify the request or even block it. The problem is how to create a web extension when using the js bindings, because a web extension is a .so loaded by the web process at startup. So at this moment I'm afraid it's not possible to do that with js, but I guess you could write the web extension in C, it will be just a few lines of code. > Fortunately, I think you can get the behavior you want using the UI > process API, by connecting to the resource-load-started signal of > WebKitWebView; that will give you a WebKitURIRequest that you can > modify. I haven't tried this before; hope it works for you. No, that signal is emitted when the request has already been sent, note that the signal is named resource-load-started, it has already started, and the signal is only a notification. > Michael > _______________________________________________ > webkit-gtk mailing list > [email protected] > https://lists.webkit.org/mailman/listinfo/webkit-gtk > -- Carlos Garcia Campos http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
signature.asc
Description: This is a digitally signed message part
_______________________________________________ webkit-gtk mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-gtk
