forked from rescript-lang/experimental-rescript-webapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHistory.res
More file actions
32 lines (27 loc) · 827 Bytes
/
History.res
File metadata and controls
32 lines (27 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
open HistoryAPI
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/go)
*/
@send
external go: (history, ~delta: int=?) => unit = "go"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/back)
*/
@send
external back: history => unit = "back"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/forward)
*/
@send
external forward: history => unit = "forward"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/pushState)
*/
@send
external pushState: (history, ~data: JSON.t, ~unused: string, ~url: string=?) => unit = "pushState"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/replaceState)
*/
@send
external replaceState: (history, ~data: JSON.t, ~unused: string, ~url: string=?) => unit =
"replaceState"