Necromancy, but in this case I think the alternative of extending WindowEventMap is inappropriate.
Hey! So this onMouseMove event listener is actually attached directly to the document when the mouse down event occurs, and removed on mouseup. It's at the document level because we want the mouse movement to be tracked even if you move the mouse outside the element you're dragging (which happens anytime the drag framerate is low).
Because it's bound directly to the window I think the right type for evt: Event is MouseEvent? That might eliminate the need for the cast because MouseEvent has a screenX.