Skip to content

Commit 4bb6f16

Browse files
committed
Add scrollX and scrollY to Window
1 parent 91bf511 commit 4bb6f16

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
@@ -2718,6 +2718,26 @@ class Window
27182718
* MDN
27192719
*/
27202720
def resizeBy(deltaX: Int, deltaY: Int): Unit = js.native
2721+
2722+
/**
2723+
* The read-only scrollX property of the Window interface returns the number
2724+
* of pixels that the document is currently scrolled horizontally. This value
2725+
* is subpixel precise in modern browsers, meaning that it isn't necessarily
2726+
* a whole number. You can get the number of pixels the document is scrolled
2727+
* vertically from the scrollY property.
2728+
*
2729+
* MDN
2730+
*/
2731+
def scrollX: Double = js.native
2732+
2733+
/**
2734+
* The read-only scrollY property of the Window interface returns the number
2735+
* of pixels that the document is currently scrolled vertically. This value
2736+
* is subpixel precise in modern browsers, meaning that it isn't necessarily
2737+
* a whole number. You can get the number of pixels the document is scrolled
2738+
* horizontally from the scrollX property.
2739+
*/
2740+
def scrollY: Double = js.native
27212741
}
27222742

27232743
/**

0 commit comments

Comments
 (0)