-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathWebStorageTypes.res
More file actions
59 lines (55 loc) · 1.93 KB
/
Copy pathWebStorageTypes.res
File metadata and controls
59 lines (55 loc) · 1.93 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@@warning("-30")
open EventTypes
/**
This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items.
[See Storage on MDN](https://developer.mozilla.org/docs/Web/API/Storage)
*/
@editor.completeFrom(Storage)
type storage = {
/**
Returns the number of key/value pairs.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Storage/length)
*/
length: int,
}
/**
A StorageEvent is sent to a window when a storage area it has access to is changed within the context of another document.
[See StorageEvent on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent)
*/
@editor.completeFrom(StorageEvent)
type storageEvent = {
...event,
/**
Returns the key of the storage item being changed.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/key)
*/
key: Null.t<string>,
/**
Returns the old value of the key of the storage item whose value is being changed.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/oldValue)
*/
oldValue: Null.t<string>,
/**
Returns the new value of the key of the storage item whose value is being changed.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/newValue)
*/
newValue: Null.t<string>,
/**
Returns the URL of the document whose storage item changed.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/url)
*/
url: string,
/**
Returns the Storage object that was affected.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/storageArea)
*/
storageArea: Null.t<storage>,
}
type storageEventInit = {
...eventInit,
mutable key?: Null.t<string>,
mutable oldValue?: Null.t<string>,
mutable newValue?: Null.t<string>,
mutable url?: string,
mutable storageArea?: Null.t<storage>,
}