@rescript/webapi 0.1.0-experimental-c882807 → 0.1.0-experimental-36cb2d1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/DOMAPI/Window.res +5 -7
- package/src/DOMAPI.res +2 -0
- package/src/Global.res +5 -6
- package/src/NotificationAPI.res +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescript/webapi",
|
|
3
|
-
"version": "0.1.0-experimental-
|
|
3
|
+
"version": "0.1.0-experimental-36cb2d1",
|
|
4
4
|
"description": "Experimental successor to [rescript-webapi](https://github.com/TheSpyder/rescript-webapi)",
|
|
5
5
|
"homepage": "https://rescript-lang.github.io/experimental-rescript-webapi/",
|
|
6
6
|
"bugs": "https://github.com/rescript-lang/experimental-rescript-webapi/issues",
|
package/src/DOMAPI/Window.res
CHANGED
|
@@ -27,22 +27,20 @@ external btoa: (window, string) => string = "btoa"
|
|
|
27
27
|
external atob: (window, string) => string = "atob"
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
@send
|
|
33
|
-
external setTimeout: (window, ~handler: string, ~timeout: int=?) => int = "setTimeout"
|
|
30
|
+
Executes a function after a delay given in milliseconds expires.
|
|
34
31
|
|
|
35
|
-
/**
|
|
36
32
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
|
|
37
33
|
*/
|
|
38
34
|
@send
|
|
39
|
-
external
|
|
35
|
+
external setTimeout: (window, ~handler: unit => unit, ~timeout: int=?) => timeoutId = "setTimeout"
|
|
40
36
|
|
|
41
37
|
/**
|
|
38
|
+
Cancels the execution of a timeout created with setTimeout.
|
|
39
|
+
|
|
42
40
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
|
|
43
41
|
*/
|
|
44
42
|
@send
|
|
45
|
-
external clearTimeout: (window,
|
|
43
|
+
external clearTimeout: (window, timeoutId) => unit = "clearTimeout"
|
|
46
44
|
|
|
47
45
|
/**
|
|
48
46
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
|
package/src/DOMAPI.res
CHANGED
package/src/Global.res
CHANGED
|
@@ -260,19 +260,18 @@ external btoa: string => string = "btoa"
|
|
|
260
260
|
external atob: string => string = "atob"
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
|
-
|
|
264
|
-
*/
|
|
265
|
-
external setTimeout: (~handler: string, ~timeout: int=?) => int = "setTimeout"
|
|
263
|
+
Executes a function after a delay given in milliseconds expires.
|
|
266
264
|
|
|
267
|
-
/**
|
|
268
265
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
|
|
269
266
|
*/
|
|
270
|
-
external
|
|
267
|
+
external setTimeout: (~handler: unit => unit, ~timeout: int=?) => timeoutId = "setTimeout"
|
|
271
268
|
|
|
272
269
|
/**
|
|
270
|
+
Cancels the execution of a timeout created with setTimeout.
|
|
271
|
+
|
|
273
272
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
|
|
274
273
|
*/
|
|
275
|
-
external clearTimeout:
|
|
274
|
+
external clearTimeout: timeoutId => unit = "clearTimeout"
|
|
276
275
|
|
|
277
276
|
/**
|
|
278
277
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
|
package/src/NotificationAPI.res
CHANGED
|
@@ -86,6 +86,10 @@ type notificationOptions = {
|
|
|
86
86
|
mutable requireInteraction?: bool,
|
|
87
87
|
mutable data?: JSON.t,
|
|
88
88
|
mutable actions?: array<notificationAction>,
|
|
89
|
+
/**
|
|
90
|
+
[Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification#vibrate)
|
|
91
|
+
*/
|
|
92
|
+
mutable vibrate?: array<int>,
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
type getNotificationOptions = {mutable tag?: string}
|