I've set up some panning content based on the HTML scrolling, panning and zooming sample: http://code.msdn.microsoft.com/windowsapps/Scrolling-panning-and-47d70d4c . I'd like an event listener for when the scroll position of my scrolling content changes.
However, since the scrolling functionality is added using CSS properties rather than specifying a
data-win-control, it's hard to figure out if there's an object whose properties I can monitor to get updates when the scroll position changes. The documentation at http://msdn.microsoft.com/en-us/library/windows/apps/hh465310.aspx seems to
imply that there is no such object exposed to JS:
The scroll control provides assistance to users for panning or scrolling a view. It is exposed to Windows Store app using JavaScript developers at design time through Cascading Style Sheets (CSS) only
I've been trying to listen for the DOMAttrModified
event on the div which contains the scroll content (with -ms-scroll-snap-type: mandatory &
overflow-x: auto; set), but it doesn't seem to fire when the scroll position changes.
Is there an event listener I can set up for notification when the scroll offset of panning content set up via CSS changes?