A polyfill for
document.scrollingElementas defined in the CSSOM specification.
InstallationIn an HTML document:
It’s recommended to place this right before the closing
The polyfill can be used in
framesetHTML documents (in that case, place the
<head>) or in XML documents as well.
Browser supportThe polyfill has been tested in the following browsers:
- Opera 11.64+
- Firefox 3.5+
- Internet Explorer 8+ (but should work even in older versions)
- Safari 8+ (but should work even in Safari 4)
AcknowledgementsThanks to Diego Perini (@diegoperini) for his
getScrollingElementimplementation, and for allowing me to re-use it as part of this polyfill.