This library lets you listen to global mouse events. This is useful for a couple tricky scenarios including:
The decoder used to extract a Position from a JavaScript mouse event.
Subscribe to mouse clicks anywhere on screen.
Subscribe to mouse moves anywhere on screen. It is best to unsubscribe if you do not need these events. Otherwise you will handle a bunch of events for no benefit.
Get a position whenever the user presses the mouse button.
Get a position whenever the user releases the mouse button.
The position of the mouse relative to the whole document. So if you are scrolled down a bunch, you are still getting a coordinate relative to the very top left corner of the whole document.