This should be fixed by the browser. If mouse is hold-clicked on scrollbar and the height of the document changes. the position of the mouse should change as well.
What's the problem with that?
Win32: http://msdn.microsoft.com/en-us/library/windows/desktop/ms64...
IIRC it isn't exposed to JS except maybe for some new fullscreen API (not my area, sorry.)