scrollX property
@DocsEditable(), @DomName('Window.scrollX')
The distance this window has been scrolled horizontally.
Other resources
The Screen interface specification from W3C. scrollX from MDN.
Implementation
@DomName('Window.scrollX')
@DocsEditable()
int get scrollX => JS('bool', '("scrollX" in #)', this)
? JS('num', '#.scrollX', this).round()
: document.documentElement.scrollLeft;