window.document.addEventListener = function(event) {...}
window.addEventListener = function(event) {...}
What is the difference between these two lines of code? I get that window and document object are two different objects with different properties and this site provides a good visual guide to the difference. Still I don't see the difference between what these two lines of code are doing.
To further clarify: what is the difference in doing something like this:
window.addEventListener('mousemove', function (event) {...});
and doing something like this window.document.addEventListener('mousemove', function (event) {...});
?