This doesn’t seem to fix the “chicken and egg” problem affecting Stand-Alone Toolbar panels in .JS, which is the .JS code being immediately killed the moment the Toolbar panel is closed.
So, if the .JS code required to make this work, is not running because the Toolbar panel is closed, it would defeat the purpose of being able to integrate JS with WASM, for example to call Coherent to either open a panel or disable/enable it depending on the context, all things possible by calling Coherent, which of course requires the .JS code to be running in the first place.
That’s why it would be useful to be able to call Coherent directly from WASM without having to rely on .JS code that might not be available, because the panel its running under is still closed. This way, we could open the panel with WASM and then rely on .JS.