I have a huge document and I need to listen on all `mousemoves` on this document.
My first obvious idea was `addEventListener()` on body, but it might introduce some performance issues (you know, bubbling stuff).

There is a mythical parameter in `addEventListener()` - `useCapture`. I don't quite get the inner workings of event propagation in DOM, but it looks promising. 

Will it be better to use capture phase, or it is not worth it?
['https://Stackoverflow.com/questions/29556212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/300639/']
The capture phase works as follows: instead of bubbling from the innermost DOM element up and out, capture starts out from the window and goes in.

Capture phase happens before the bubbling phase, so it's handy if you want to stop the propagation of an event before it even gets to the inner DOM elements.

Which can also be a problem if done inadvertently. If you set your mousemove at capture phase in the body and stop the propagation of that event for some reason, no other DOM element is going to get a mousemove event anymore.

See the always enlightening Quirksmode post on it: <http://www.quirksmode.org/js/events_order.html>
jQuery did have `live` deprecated due to the fact that [bubbling does take time to reach the root](http://www.sitepoint.com/on-vs-live-review/) (where `live` placed all handlers). For small stuff, this isn't an issue. But if you have a deep DOM tree or a lot of things happening, then this becomes a big problem. The better replacement for jQuery was `on` as you can decide how far up (or down) the tree the handler can be attached. This limited what elements the event can be triggered from, as well as the number of nodes to bubble up.

The bigger issue here is what runs in response to the event, as `mousemove` fires several times during movement. Binding it to body means that the code you attached to the event has to fire every time you move the mouse. You might want to limit what runs in response to the event, or keep the attached code as lean and as non-blocking as possible.