Page 1 of 1

document.addEventListener or window.addEventListener

Posted: Sun Jan 04, 2015 4:55 am
by M&M

hi,

Just wanted to make some sense of the

document.addEventListener or window.addEventListener

So I guess when I were to add an event listener in a JS file I would use
document.addEventListener and when I add an event listener from the screen / page builder events I should use window.addEventListener

Just curious as I wanted to know if there is anything I am missing :-)

Thanks,
M&M


document.addEventListener or window.addEventListener

Posted: Sun Jan 04, 2015 4:56 am
by M&M

hi,

Ok i found my answer here ",)

http://stackoverflow.com/questions/12...

Cheers,
M&M