forked from rescript-lang/experimental-rescript-webapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHistoryAPI.res
More file actions
25 lines (23 loc) · 730 Bytes
/
HistoryAPI.res
File metadata and controls
25 lines (23 loc) · 730 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
@@warning("-30")
type scrollRestoration =
| @as("auto") Auto
| @as("manual") Manual
/**
Allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.
[See History on MDN](https://developer.mozilla.org/docs/Web/API/History)
*/
@editor.completeFrom(History)
type history = {
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/length)
*/
length: int,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/scrollRestoration)
*/
mutable scrollRestoration: scrollRestoration,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/state)
*/
state: JSON.t,
}