On Mon, Dec 12, 2011 at 13:41, Iranian Secure <[email protected]> wrote: > I'm using webkitgtk for showing special data using HTML, > all data is generated at run-time and is set by webkit_web_view_load_string, > my problem is that webkit-gtk tries to open JavaScript and CSS files > by making a network request but I want it to load them how I want, > is there a way to tell webkit-gtk to use a custom function instead of > using libsoup?
You can connect to the WebView's signal 'resource-request-starting' [1]. In the callback you can tell webkit to either ignore the request by setting the URI to 'about:blank' or you can swap in your custom content by using a data URL 'data:data-goes-here'. I haven't tested this last option but I saw it on the internet so it must be true :) [1] http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView-resource-request-starting -- Emmanuel Rodriguez _______________________________________________ webkit-gtk mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk
