Skip to content

Commit

Permalink
Add scrollX and scrollY to Window
Browse files Browse the repository at this point in the history
  • Loading branch information
anilanar authored and japgolly committed Aug 12, 2021
1 parent c9735a3 commit 0221fc0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/scala/org/scalajs/dom/raw/lib.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2790,6 +2790,26 @@ class Window
* MDN
*/
def resizeBy(deltaX: Int, deltaY: Int): Unit = js.native

/**
* The read-only scrollX property of the Window interface returns the number
* of pixels that the document is currently scrolled horizontally. This value
* is subpixel precise in modern browsers, meaning that it isn't necessarily
* a whole number. You can get the number of pixels the document is scrolled
* vertically from the scrollY property.
*
* MDN
*/
def scrollX: Double = js.native

/**
* The read-only scrollY property of the Window interface returns the number
* of pixels that the document is currently scrolled vertically. This value
* is subpixel precise in modern browsers, meaning that it isn't necessarily
* a whole number. You can get the number of pixels the document is scrolled
* horizontally from the scrollX property.
*/
def scrollY: Double = js.native
}

/**
Expand Down

0 comments on commit 0221fc0

Please sign in to comment.