Hey all,
I am currently trying to import a script package that fires an event on the window channel. This works perfectly on a raw html page:
const eventName = 'eventNameFromImportedScript';
const onBootstrapped = () => {
window.removeEventListener(eventName, onBootstrapped);
console.log("has been bootstrapped");
});
};
window.addEventListener(eventName, onBootstrapped);
But when I do that on a playcanvas app through the editor, the window event never fires. Does anyone have any thoughts? The script that fires the event is added via the external script panel in the editor.