javascript - How the object 'window' bind addEventListener()? -


i learning javascript , know there window object.

i log object, find lots of functions can't find function addeventlistener, have used lots of times.

i use function like:

window.addeventlistener('click', function(){     alert(123) }); 

i want know when addeventlistener() bind object window?

window inherits addeventlistener method eventtarget on prototype. in other words, doesn't define itself, it's not listed on own methods, , have follow prototype chain.

window prototype


Comments

Popular posts from this blog

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -