It seems body.scrollTop (and body.scrollLeft) are deprecated in ES5 strict-mode. What is the reason for this, given that it still seems okay to use
It's Chrome's own incorrect behavior that is deprecated, and they're warning authors to stop relying on it.
The scrolling viewport is represented by document.documentElement () in standards mode or
in quirks mode. (Quirks mode emulates the document rendering of Navigator 4 and Explorer 5.)Chrome uses body.scrollTop to represent the viewport's scroll position in both modes, which is wrong. It sounds like they want to fix this so they're encouraging authors to script for the standard behavior.
I don't think you need to change your code. There's nothing wrong with using body.scrollTop in standards mode so long as you understand it represents the scroll position of body only (typically 0, unless you've given body a scroll box).
You can see the warning by executing document.body.scrollTop in the console:
body.scrollTopis deprecated in strict mode. Please usedocumentElement.scrollTopif in strict mode andbody.scrollToponly if in quirks mode.