I have a few games that run on my website and they all hook into an sdk. The sdk can open/close modals, and the modal dispatches events. Is there anyway in construct to listen for those events?
In the browser I currently run this code:
window.dispatchEvent(new CustomEvent('gs.modal.open'));[/code:24o6cg9l]
In construct I would like to listen for this event, is there anyway to do this? In JavaScript I would simply do this:
[code:24o6cg9l]window.addEventListener('gs.modal.open', e => { /* Execute my JavaScript here */ })[/code:24o6cg9l]