Domanda

Inside my WebKitGTK+ widget, I want to transparently replace some of the images of an HTML page with different image data I hold in memory.

According to the documentation at http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html#WebKitWebView-resource-request-starting, I've hooked into this signal, which allows the request URI to be changed, but what I really want is to leave it unchanged but generate my own response.

I've tried filling out the WebKitWebResource parameter, and filling out the SoupMessage response from the WebKitNetworkRequest to no avail. Anyone know how to do this?

È stato utile?

Soluzione

figured out one way to do it: replacing the request URL with "data:image/jpeg;base64,[inline data]".

Will do for me.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top