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

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -