browserevent icon indicating copy to clipboard operation
browserevent copied to clipboard

Is there a way to attach an event to window?

Open dtracers opened this issue 9 years ago • 1 comments

I have some custom events that are not attached to any element at all

dtracers avatar Jun 01 '15 05:06 dtracers

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

hdattada avatar Jan 10 '17 17:01 hdattada