I'm building an extension whose service worker is written in WASM with Rust. It has been a good experience so far. There are only a few lines of JS in the worker, and those lines just load the WASM asynchronously. It could be loaded semi-synchronously, by which I mean that the loading could be synchronous except that the WASM file has to be retrieved via fetch(), which would make it miss the first iteration of the event loop, and therefore wouldn't be really synchronous.
I've read this in this group in other posts, which seems to be accurate based on my tests: "The `addListener` must be called synchronously in the first iteration of the event loop."
Is there any way that I can use WASM to handle the onInstalled event?
Thanks in advance!