Skip to content

Commit 0221fc0

Browse files
anilanarjapgolly
authored andcommitted
Add scrollX and scrollY to Window
1 parent c9735a3 commit 0221fc0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/main/scala/org/scalajs/dom/raw/lib.scala

+20
Original file line numberDiff line numberDiff line change
@@ -2790,6 +2790,26 @@ class Window
27902790
* MDN
27912791
*/
27922792
def resizeBy(deltaX: Int, deltaY: Int): Unit = js.native
2793+
2794+
/**
2795+
* The read-only scrollX property of the Window interface returns the number
2796+
* of pixels that the document is currently scrolled horizontally. This value
2797+
* is subpixel precise in modern browsers, meaning that it isn't necessarily
2798+
* a whole number. You can get the number of pixels the document is scrolled
2799+
* vertically from the scrollY property.
2800+
*
2801+
* MDN
2802+
*/
2803+
def scrollX: Double = js.native
2804+
2805+
/**
2806+
* The read-only scrollY property of the Window interface returns the number
2807+
* of pixels that the document is currently scrolled vertically. This value
2808+
* is subpixel precise in modern browsers, meaning that it isn't necessarily
2809+
* a whole number. You can get the number of pixels the document is scrolled
2810+
* horizontally from the scrollX property.
2811+
*/
2812+
def scrollY: Double = js.native
27932813
}
27942814

27952815
/**

0 commit comments

Comments
 (0)