browserevent
browserevent copied to clipboard
Is there a way to attach an event to window?
I have some custom events that are not attached to any element at all
I am trying to do the same, attaching an event to window
browser.addEventListener('onunload', 'window', (e) => { console.log('browser unloaded') console.log(e) })
and I see the below error, I am not sure if this is the right way
Cannot set property 'removeEventListener' of undefined