[wpe-webkit] Synchronous JS interactions with native code

Michael Catanzaro mcatanzaro at igalia.com
Tue Jun 25 07:41:46 PDT 2019


On Tue, Jun 25, 2019 at 9:15 AM, Michael Catanzaro 
<mcatanzaro at igalia.com> wrote:
> Then in window_object_cleared() you can use the JSC API to define 
> some function that returns the manifest.

Of course that function should be named getManifest, and you're going 
to want to make it a property of your runtime object, which should 
itself be a property of your browser object. I think browser and 
runtime might be best defined in JS (the same way Epiphany defines its 
Ephy object in ephy.js), but you could create them in 
window-object-cleared using the JSC API just as well. getManifest would 
definitely need to be created using the JSC API in 
window-object-cleared.

Using window-object-cleared is important because if you do the work 
somewhere else, it might work sometimes, e.g. when you test it, but it 
won't work reliably.

Michael




More information about the webkit-wpe mailing list