From smntov at gmail.com Fri Jan 3 05:22:45 2025 From: smntov at gmail.com (Sim Tov) Date: Fri, 3 Jan 2025 15:22:45 +0200 Subject: [webkit-gtk] Interface between embedded Javascript and the main GTK app In-Reply-To: References: Message-ID: Thank you very much Michael! Finally I was able to get to this project. The idea is to create a small GTK-based text editor with live preview for [djot](https://github.com/jgm/djot.js). I've managed to advance a bit (see the attached file) and now need to know how exactly to interact with the javascript in both direction (main GTK app <-> JS inside WebKitGTK). Please consider this HTML document (you can copy/paste it and open in your browser): Djot in the browser

1. How can I supply a string (in this case - djotContent) from the main GTK app to the djot.parse(djotContent, { sourcePositions: true }) function (instead of keeping it inside