We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


The scrollingElement read-only property of the Document interface returns a reference to the Element that scrolls the document. In standards mode, this is the root element of the document, document.documentElement.

When in quirks mode, the scrollingElement attribute returns the HTML body element (or null if it does not exist).


var element = document.scrollingElement;


var scrollElm = document.scrollingElement;
scrollElm.scrollTop = 0;


Specification Status Comment
CSS Object Model (CSSOM) View Module
The definition of 'scrollingElement' in that specification.
Working Draft Initial definition

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support 44.0 (Yes) 48.0 (48.0)[1] No support 33.0 9.0
Feature Android Edge Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support (Yes) ? ? No support 36 9.0 44.0

[1] This feature was initially implemented in Gecko 47.0 (Firefox 47.0 / Thunderbird 47.0 / SeaMonkey 2.44) behind the preference dom.document.scrollingElement.enabled, defaulting to true on Nightly builds and false otherwise. In Gecko 48.0 (Firefox 48.0 / Thunderbird 48.0 / SeaMonkey 2.45) the feature got enabled by default and the preference removed.

Document Tags and Contributors

 Last updated by: jaffathecake,