WebKit2 IPC?
Hi, I am wondering how to best go about communicating between my GTK app and the webview's Javascript. Older examples like this one use webview.execute_script
and writing to window.status
could be captured in the app via the 'status_bar_text_changed'
signal.
With WebKit2 we can use webview.run_javascript
but can no longer listen to window.status. I've discovered that I can capture messages using alert(message)
in the webview script and listen for the 'script-dialog'
signal.
Both seem a bit awkward however, and I believe there is a small limit to the size of data we can send via run_javascript
. This makes it impractical to load files from the filesystem and send them to the webview.