On Wed, 13 Sep 2017 17:55:20 +0200, Jérémy Lal <[email protected]> wrote: > Also it's simpler to setup a limited javascript -> main process event > listener using a "script message handler".
I was about to mention this :-) For the opposite direction (Main process -> JavaScript), you can use webkit_web_view_run_javascript() and call code in the JS world: https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#webkit-web-view-run-javascript As a complement to the above, if you need to add extra glue code to the JS world that is not included in your loaded web content, you can use webkit_user_content_manager_add_script() to inject JS code from the main process: https://webkitgtk.org/reference/webkit2gtk/stable/WebKitUserContentManager.html#webkit-user-content-manager-add-script Hope this helps! -- Adrián 🎩
pgpYTkP_33FQj.pgp
Description: PGP signature
_______________________________________________ webkit-gtk mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-gtk
