scrollY property
The distance this window has been scrolled vertically.
Other resources
- The Screen interface specification from W3C.
- scrollY from MDN.
Implementation
int get scrollY => JS<bool>('bool', '("scrollY" in #)', this)
? JS<num>('num', '#.scrollY', this).round()
: document.documentElement!.scrollTop;