Skip to content

Commit fad74e1

Browse files
Fix #254: Correct signature of history navigation methods
Only the go() method should take a delta parameter, which should always be an Int
1 parent 38dab97 commit fad74e1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5146,8 +5146,6 @@ class History extends js.Object {
51465146
*/
51475147
def length: Int = js.native
51485148

5149-
def back(distance: js.Any): Unit = js.native
5150-
51515149
/**
51525150
* Goes to the previous page in session history, the same action as when the user clicks
51535151
* the browser's Back button. Equivalent to history.go(-1). Note: Calling this
@@ -5158,8 +5156,6 @@ class History extends js.Object {
51585156
*/
51595157
def back(): Unit = js.native
51605158

5161-
def forward(distance: js.Any): Unit = js.native
5162-
51635159
/**
51645160
* Goes to the next page in session history, the same action as when the user clicks the
51655161
* browser's Forward button; this is equivalent to history.go(1). Note: Calling
@@ -5170,7 +5166,7 @@ class History extends js.Object {
51705166
*/
51715167
def forward(): Unit = js.native
51725168

5173-
def go(delta: js.Any): Unit = js.native
5169+
def go(delta: Int): Unit = js.native
51745170

51755171
/**
51765172
* Loads a page from the session history, identified by its relative location to the

0 commit comments

Comments
 (0)