[webkit-gtk] [Q] How to intercept file requests?

Michael Catanzaro mcatanzaro at redhat.com
Thu Feb 22 17:31:22 PST 2024


On Fri, Feb 23 2024 at 07:57:54 AM +08:00:00, yfwz100 at hotmail.com wrote:
> Can I use web process extention to implement this?

You can use a web process extension to inject JavaScript that runs when 
the page loads and try to accomplish what you want that way. In 
Epiphany, look at ephy_web_process_extension_initialize() and 
window_object_cleared_cb() for examples. Some other signals you might 
need, depending on what exactly you're trying to do: 
WebKitWebProcessExtension::page-created (this corresponds to a 
WebKitWebPage object, not the particular web page that you're loading) 
and WebKitWebProcessExtension::document-loaded




More information about the webkit-gtk mailing list