-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathNavigator.res
More file actions
122 lines (103 loc) · 3.48 KB
/
Copy pathNavigator.res
File metadata and controls
122 lines (103 loc) · 3.48 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
open DOMTypes
open FileTypes
open FetchTypes
open URLTypes
open EncryptedMediaExtensionsTypes
open GamepadTypes
open WebMIDITypes
type t = DOMTypes.navigator = {...DOMTypes.navigator}
external current: t = "navigator"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/setAppBadge)
*/
@send
external setAppBadge: (navigator, ~contents: int=?) => promise<unit> = "setAppBadge"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/clearAppBadge)
*/
@send
external clearAppBadge: navigator => promise<unit> = "clearAppBadge"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)
*/
@send
external registerProtocolHandler: (navigator, ~scheme: string, ~url: string) => unit =
"registerProtocolHandler"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
*/
@send
external sendBeacon: (navigator, ~url: string, ~data: readableStream<unit>=?) => bool = "sendBeacon"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
*/
@send
external sendBeaconWithBlob: (navigator, ~url: string, ~data: blob=?) => bool = "sendBeacon"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
*/
@send
external sendBeaconWithDataView: (navigator, ~url: string, ~data: DataView.t=?) => bool =
"sendBeacon"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
*/
@send
external sendBeaconWithArrayBuffer: (navigator, ~url: string, ~data: ArrayBuffer.t=?) => bool =
"sendBeacon"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
*/
@send
external sendBeaconWithFormData: (navigator, ~url: string, ~data: formData=?) => bool = "sendBeacon"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
*/
@send
external sendBeaconWithSearchParams: (navigator, ~url: string, ~data: urlSearchParams=?) => bool =
"sendBeacon"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
*/
@send
external sendBeaconWithString: (navigator, ~url: string, ~data: string=?) => bool = "sendBeacon"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/requestMediaKeySystemAccess)
*/
@send
external requestMediaKeySystemAccess: (
navigator,
~keySystem: string,
~supportedConfigurations: array<mediaKeySystemConfiguration>,
) => promise<mediaKeySystemAccess> = "requestMediaKeySystemAccess"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/getGamepads)
*/
@send
external getGamepads: navigator => array<gamepad> = "getGamepads"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate)
*/
@send
external vibrate: (navigator, int) => bool = "vibrate"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate)
*/
@send
external vibrateWithPattern: (navigator, array<int>) => bool = "vibrate"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/share)
*/
@send
external share: (navigator, ~data: shareData=?) => promise<unit> = "share"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/canShare)
*/
@send
external canShare: (navigator, ~data: shareData=?) => bool = "canShare"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/requestMIDIAccess)
*/
@send
external requestMIDIAccess: (navigator, ~options: midiOptions=?) => promise<midiAccess> =
"requestMIDIAccess"