@rescript/webapi 0.1.0-experimental-ae83778 → 0.1.0-experimental-e13fb00
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/CSSFontLoadingAPI/FontFace.res +1 -1
- package/src/CSSFontLoadingAPI/FontFaceSet.res +1 -1
- package/src/CSSFontLoadingAPI.res +2 -2
- package/src/CanvasAPI/OffscreenCanvas.res +1 -1
- package/src/ClipboardAPI/Clipboard.res +4 -4
- package/src/ClipboardAPI/ClipboardItem.res +1 -1
- package/src/CredentialManagementAPI/CredentialsContainer.res +4 -4
- package/src/DOMAPI/CSSStyleSheet.res +1 -1
- package/src/DOMAPI/CustomElementRegistry.res +1 -1
- package/src/DOMAPI/Document.res +4 -4
- package/src/DOMAPI/Element.res +2 -2
- package/src/DOMAPI/HTMLImageElement.res +1 -1
- package/src/DOMAPI/HTMLMediaElement.res +3 -3
- package/src/DOMAPI/HTMLVideoElement.res +1 -1
- package/src/DOMAPI/Navigator.res +5 -5
- package/src/DOMAPI/VideoFrame.res +3 -3
- package/src/DOMAPI/Window.res +20 -20
- package/src/DOMAPI.res +2 -2
- package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +7 -7
- package/src/EncryptedMediaExtensionsAPI/MediaKeySystemAccess.res +1 -1
- package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +3 -3
- package/src/EncryptedMediaExtensionsAPI.res +1 -1
- package/src/FetchAPI/Request.res +6 -6
- package/src/FetchAPI/Response.res +6 -6
- package/src/FileAPI/Blob.res +3 -3
- package/src/FileAPI/FileSystemDirectoryHandle.res +5 -5
- package/src/FileAPI/FileSystemFileHandle.res +3 -3
- package/src/FileAPI/FileSystemHandle.res +1 -1
- package/src/FileAPI/FileSystemWritableFileStream.res +9 -9
- package/src/FileAPI/ReadableStream.res +2 -2
- package/src/FileAPI/WritableStream.res +2 -2
- package/src/FileAPI.res +1 -1
- package/src/GamepadAPI/GamepadHapticActuator.res +2 -2
- package/src/Global.res +20 -20
- package/src/IndexedDBAPI/IDBFactory.res +1 -1
- package/src/MediaCapabilitiesAPI/MediaCapabilities.res +2 -2
- package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +3 -3
- package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +1 -1
- package/src/NotificationAPI/Notification.res +1 -1
- package/src/PermissionsAPI/Permissions.res +1 -1
- package/src/PushManagerAPI/PushManager.res +3 -3
- package/src/PushManagerAPI/PushSubscription.res +1 -1
- package/src/RemotePlaybackAPI/RemotePlayback.res +3 -3
- package/src/ScreenWakeLockAPI/WakeLock.res +1 -1
- package/src/ScreenWakeLockAPI/WakeLockSentinel.res +1 -1
- package/src/ServiceWorkerAPI/Cache.res +11 -11
- package/src/ServiceWorkerAPI/CacheStorage.res +4 -4
- package/src/ServiceWorkerAPI/NavigationPreloadManager.res +4 -4
- package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +2 -2
- package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +4 -4
- package/src/ServiceWorkerAPI.res +1 -1
- package/src/StorageAPI/StorageManager.res +4 -4
- package/src/ViewTransitionsAPI.res +4 -4
- package/src/WebAudioAPI/AudioContext.res +3 -3
- package/src/WebAudioAPI/BaseAudioContext.res +1 -1
- package/src/WebAudioAPI/OfflineAudioContext.res +3 -3
- package/src/WebAudioAPI/Worklet.res +1 -1
- package/src/WebCryptoAPI/SubtleCrypto.res +15 -15
- package/src/WebLocksAPI/LockManager.res +3 -3
- package/src/WebLocksAPI.res +1 -1
|
@@ -48,37 +48,37 @@ external make7: (~body: string=?, ~init: responseInit=?) => response = "Response
|
|
|
48
48
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer)
|
|
49
49
|
*/
|
|
50
50
|
@send
|
|
51
|
-
external arrayBuffer: response =>
|
|
51
|
+
external arrayBuffer: response => promise<ArrayBuffer.t> = "arrayBuffer"
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/blob)
|
|
55
55
|
*/
|
|
56
56
|
@send
|
|
57
|
-
external blob: response =>
|
|
57
|
+
external blob: response => promise<blob> = "blob"
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/bytes)
|
|
61
61
|
*/
|
|
62
62
|
@send
|
|
63
|
-
external bytes: response =>
|
|
63
|
+
external bytes: response => promise<array<int>> = "bytes"
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/formData)
|
|
67
67
|
*/
|
|
68
68
|
@send
|
|
69
|
-
external formData: response =>
|
|
69
|
+
external formData: response => promise<formData> = "formData"
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/json)
|
|
73
73
|
*/
|
|
74
74
|
@send
|
|
75
|
-
external json: response =>
|
|
75
|
+
external json: response => promise<JSON.t> = "json"
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/text)
|
|
79
79
|
*/
|
|
80
80
|
@send
|
|
81
|
-
external text: response =>
|
|
81
|
+
external text: response => promise<string> = "text"
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Response/error_static)
|
package/src/FileAPI/Blob.res
CHANGED
|
@@ -28,19 +28,19 @@ module Impl = (
|
|
|
28
28
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
|
29
29
|
*/
|
|
30
30
|
@send
|
|
31
|
-
external text: T.t =>
|
|
31
|
+
external text: T.t => promise<string> = "text"
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer)
|
|
35
35
|
*/
|
|
36
36
|
@send
|
|
37
|
-
external arrayBuffer: T.t =>
|
|
37
|
+
external arrayBuffer: T.t => promise<ArrayBuffer.t> = "arrayBuffer"
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Blob/bytes)
|
|
41
41
|
*/
|
|
42
42
|
@send
|
|
43
|
-
external bytes: T.t =>
|
|
43
|
+
external bytes: T.t => promise<array<int>> = "bytes"
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
include Impl({
|
|
@@ -5,7 +5,7 @@ external asFileSystemHandle: fileSystemDirectoryHandle => fileSystemHandle = "%i
|
|
|
5
5
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry)
|
|
6
6
|
*/
|
|
7
7
|
@send
|
|
8
|
-
external isSameEntry: (fileSystemDirectoryHandle, fileSystemHandle) =>
|
|
8
|
+
external isSameEntry: (fileSystemDirectoryHandle, fileSystemHandle) => promise<bool> =
|
|
9
9
|
"isSameEntry"
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -16,7 +16,7 @@ external getFileHandle: (
|
|
|
16
16
|
fileSystemDirectoryHandle,
|
|
17
17
|
~name: string,
|
|
18
18
|
~options: fileSystemGetFileOptions=?,
|
|
19
|
-
) =>
|
|
19
|
+
) => promise<fileSystemFileHandle> = "getFileHandle"
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/getDirectoryHandle)
|
|
@@ -26,7 +26,7 @@ external getDirectoryHandle: (
|
|
|
26
26
|
fileSystemDirectoryHandle,
|
|
27
27
|
~name: string,
|
|
28
28
|
~options: fileSystemGetDirectoryOptions=?,
|
|
29
|
-
) =>
|
|
29
|
+
) => promise<fileSystemDirectoryHandle> = "getDirectoryHandle"
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/removeEntry)
|
|
@@ -36,11 +36,11 @@ external removeEntry: (
|
|
|
36
36
|
fileSystemDirectoryHandle,
|
|
37
37
|
~name: string,
|
|
38
38
|
~options: fileSystemRemoveOptions=?,
|
|
39
|
-
) =>
|
|
39
|
+
) => promise<unit> = "removeEntry"
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve)
|
|
43
43
|
*/
|
|
44
44
|
@send
|
|
45
|
-
external resolve: (fileSystemDirectoryHandle, fileSystemHandle) =>
|
|
45
|
+
external resolve: (fileSystemDirectoryHandle, fileSystemHandle) => promise<array<string>> =
|
|
46
46
|
"resolve"
|
|
@@ -5,13 +5,13 @@ external asFileSystemHandle: fileSystemFileHandle => fileSystemHandle = "%identi
|
|
|
5
5
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry)
|
|
6
6
|
*/
|
|
7
7
|
@send
|
|
8
|
-
external isSameEntry: (fileSystemFileHandle, fileSystemHandle) =>
|
|
8
|
+
external isSameEntry: (fileSystemFileHandle, fileSystemHandle) => promise<bool> = "isSameEntry"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/getFile)
|
|
12
12
|
*/
|
|
13
13
|
@send
|
|
14
|
-
external getFile: fileSystemFileHandle =>
|
|
14
|
+
external getFile: fileSystemFileHandle => promise<file> = "getFile"
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/createWritable)
|
|
@@ -20,4 +20,4 @@ external getFile: fileSystemFileHandle => Promise.t<file> = "getFile"
|
|
|
20
20
|
external createWritable: (
|
|
21
21
|
fileSystemFileHandle,
|
|
22
22
|
~options: fileSystemCreateWritableOptions=?,
|
|
23
|
-
) =>
|
|
23
|
+
) => promise<fileSystemWritableFileStream> = "createWritable"
|
|
@@ -4,4 +4,4 @@ open FileAPI
|
|
|
4
4
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry)
|
|
5
5
|
*/
|
|
6
6
|
@send
|
|
7
|
-
external isSameEntry: (fileSystemHandle, fileSystemHandle) =>
|
|
7
|
+
external isSameEntry: (fileSystemHandle, fileSystemHandle) => promise<bool> = "isSameEntry"
|
|
@@ -6,13 +6,13 @@ external asWritableStream: fileSystemWritableFileStream => writableStream<'w> =
|
|
|
6
6
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
|
|
7
7
|
*/
|
|
8
8
|
@send
|
|
9
|
-
external abort: (fileSystemWritableFileStream, ~reason: JSON.t=?) =>
|
|
9
|
+
external abort: (fileSystemWritableFileStream, ~reason: JSON.t=?) => promise<unit> = "abort"
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
13
13
|
*/
|
|
14
14
|
@send
|
|
15
|
-
external close: fileSystemWritableFileStream =>
|
|
15
|
+
external close: fileSystemWritableFileStream => promise<unit> = "close"
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
@@ -24,40 +24,40 @@ external getWriter: fileSystemWritableFileStream => writableStreamDefaultWriter<
|
|
|
24
24
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
25
25
|
*/
|
|
26
26
|
@send
|
|
27
|
-
external write: (fileSystemWritableFileStream, DataView.t) =>
|
|
27
|
+
external write: (fileSystemWritableFileStream, DataView.t) => promise<unit> = "write"
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
31
31
|
*/
|
|
32
32
|
@send
|
|
33
|
-
external write2: (fileSystemWritableFileStream, ArrayBuffer.t) =>
|
|
33
|
+
external write2: (fileSystemWritableFileStream, ArrayBuffer.t) => promise<unit> = "write"
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
37
37
|
*/
|
|
38
38
|
@send
|
|
39
|
-
external write3: (fileSystemWritableFileStream, blob) =>
|
|
39
|
+
external write3: (fileSystemWritableFileStream, blob) => promise<unit> = "write"
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
43
43
|
*/
|
|
44
44
|
@send
|
|
45
|
-
external write4: (fileSystemWritableFileStream, string) =>
|
|
45
|
+
external write4: (fileSystemWritableFileStream, string) => promise<unit> = "write"
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
49
49
|
*/
|
|
50
50
|
@send
|
|
51
|
-
external write5: (fileSystemWritableFileStream, writeParams) =>
|
|
51
|
+
external write5: (fileSystemWritableFileStream, writeParams) => promise<unit> = "write"
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/seek)
|
|
55
55
|
*/
|
|
56
56
|
@send
|
|
57
|
-
external seek: (fileSystemWritableFileStream, int) =>
|
|
57
|
+
external seek: (fileSystemWritableFileStream, int) => promise<unit> = "seek"
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/truncate)
|
|
61
61
|
*/
|
|
62
62
|
@send
|
|
63
|
-
external truncate: (fileSystemWritableFileStream, int) =>
|
|
63
|
+
external truncate: (fileSystemWritableFileStream, int) => promise<unit> = "truncate"
|
|
@@ -23,7 +23,7 @@ external make3: unit => unknown = "ReadableStream"
|
|
|
23
23
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
|
|
24
24
|
*/
|
|
25
25
|
@send
|
|
26
|
-
external cancel: (readableStream<'r>, ~reason: JSON.t=?) =>
|
|
26
|
+
external cancel: (readableStream<'r>, ~reason: JSON.t=?) => promise<unit> = "cancel"
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
@@ -52,7 +52,7 @@ external pipeTo: (
|
|
|
52
52
|
readableStream<'r>,
|
|
53
53
|
~destination: writableStream<'r>,
|
|
54
54
|
~options: streamPipeOptions=?,
|
|
55
|
-
) =>
|
|
55
|
+
) => promise<unit> = "pipeTo"
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
@@ -14,13 +14,13 @@ external make: (
|
|
|
14
14
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
|
|
15
15
|
*/
|
|
16
16
|
@send
|
|
17
|
-
external abort: (writableStream<'w>, ~reason: JSON.t=?) =>
|
|
17
|
+
external abort: (writableStream<'w>, ~reason: JSON.t=?) => promise<unit> = "abort"
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
21
21
|
*/
|
|
22
22
|
@send
|
|
23
|
-
external close: writableStream<'w> =>
|
|
23
|
+
external close: writableStream<'w> => promise<unit> = "close"
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
package/src/FileAPI.res
CHANGED
|
@@ -139,7 +139,7 @@ type writableStreamDefaultWriter<'t> = any
|
|
|
139
139
|
|
|
140
140
|
type fileSystemWriteChunkType = any
|
|
141
141
|
|
|
142
|
-
type underlyingSourceCancelCallback = JSON.t =>
|
|
142
|
+
type underlyingSourceCancelCallback = JSON.t => promise<unit>
|
|
143
143
|
|
|
144
144
|
type blobPropertyBag = {
|
|
145
145
|
@as("type") mutable type_?: string,
|
|
@@ -8,10 +8,10 @@ external playEffect: (
|
|
|
8
8
|
gamepadHapticActuator,
|
|
9
9
|
~type_: gamepadHapticEffectType,
|
|
10
10
|
~params: gamepadEffectParameters=?,
|
|
11
|
-
) =>
|
|
11
|
+
) => promise<gamepadHapticsResult> = "playEffect"
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/reset)
|
|
15
15
|
*/
|
|
16
16
|
@send
|
|
17
|
-
external reset: gamepadHapticActuator =>
|
|
17
|
+
external reset: gamepadHapticActuator => promise<gamepadHapticsResult> = "reset"
|
package/src/Global.res
CHANGED
|
@@ -300,7 +300,7 @@ external queueMicrotask: voidFunction => unit = "queueMicrotask"
|
|
|
300
300
|
external createImageBitmap: (
|
|
301
301
|
~image: htmlImageElement,
|
|
302
302
|
~options: imageBitmapOptions=?,
|
|
303
|
-
) =>
|
|
303
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -308,7 +308,7 @@ external createImageBitmap: (
|
|
|
308
308
|
external createImageBitmap2: (
|
|
309
309
|
~image: svgImageElement,
|
|
310
310
|
~options: imageBitmapOptions=?,
|
|
311
|
-
) =>
|
|
311
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
312
312
|
|
|
313
313
|
/**
|
|
314
314
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -316,7 +316,7 @@ external createImageBitmap2: (
|
|
|
316
316
|
external createImageBitmap3: (
|
|
317
317
|
~image: htmlVideoElement,
|
|
318
318
|
~options: imageBitmapOptions=?,
|
|
319
|
-
) =>
|
|
319
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
320
320
|
|
|
321
321
|
/**
|
|
322
322
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -324,7 +324,7 @@ external createImageBitmap3: (
|
|
|
324
324
|
external createImageBitmap4: (
|
|
325
325
|
~image: htmlCanvasElement,
|
|
326
326
|
~options: imageBitmapOptions=?,
|
|
327
|
-
) =>
|
|
327
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
330
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -332,7 +332,7 @@ external createImageBitmap4: (
|
|
|
332
332
|
external createImageBitmap5: (
|
|
333
333
|
~image: imageBitmap,
|
|
334
334
|
~options: imageBitmapOptions=?,
|
|
335
|
-
) =>
|
|
335
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
336
336
|
|
|
337
337
|
/**
|
|
338
338
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -340,7 +340,7 @@ external createImageBitmap5: (
|
|
|
340
340
|
external createImageBitmap6: (
|
|
341
341
|
~image: offscreenCanvas,
|
|
342
342
|
~options: imageBitmapOptions=?,
|
|
343
|
-
) =>
|
|
343
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
344
344
|
|
|
345
345
|
/**
|
|
346
346
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -348,7 +348,7 @@ external createImageBitmap6: (
|
|
|
348
348
|
external createImageBitmap7: (
|
|
349
349
|
~image: videoFrame,
|
|
350
350
|
~options: imageBitmapOptions=?,
|
|
351
|
-
) =>
|
|
351
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
354
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -356,7 +356,7 @@ external createImageBitmap7: (
|
|
|
356
356
|
external createImageBitmap8: (
|
|
357
357
|
~image: blob,
|
|
358
358
|
~options: imageBitmapOptions=?,
|
|
359
|
-
) =>
|
|
359
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
360
360
|
|
|
361
361
|
/**
|
|
362
362
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -364,7 +364,7 @@ external createImageBitmap8: (
|
|
|
364
364
|
external createImageBitmap9: (
|
|
365
365
|
~image: imageData,
|
|
366
366
|
~options: imageBitmapOptions=?,
|
|
367
|
-
) =>
|
|
367
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
368
368
|
|
|
369
369
|
/**
|
|
370
370
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -376,7 +376,7 @@ external createImageBitmap10: (
|
|
|
376
376
|
~sw: int,
|
|
377
377
|
~sh: int,
|
|
378
378
|
~options: imageBitmapOptions=?,
|
|
379
|
-
) =>
|
|
379
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
380
380
|
|
|
381
381
|
/**
|
|
382
382
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -388,7 +388,7 @@ external createImageBitmap11: (
|
|
|
388
388
|
~sw: int,
|
|
389
389
|
~sh: int,
|
|
390
390
|
~options: imageBitmapOptions=?,
|
|
391
|
-
) =>
|
|
391
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
394
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -400,7 +400,7 @@ external createImageBitmap12: (
|
|
|
400
400
|
~sw: int,
|
|
401
401
|
~sh: int,
|
|
402
402
|
~options: imageBitmapOptions=?,
|
|
403
|
-
) =>
|
|
403
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
404
404
|
|
|
405
405
|
/**
|
|
406
406
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -412,7 +412,7 @@ external createImageBitmap13: (
|
|
|
412
412
|
~sw: int,
|
|
413
413
|
~sh: int,
|
|
414
414
|
~options: imageBitmapOptions=?,
|
|
415
|
-
) =>
|
|
415
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
416
416
|
|
|
417
417
|
/**
|
|
418
418
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -424,7 +424,7 @@ external createImageBitmap14: (
|
|
|
424
424
|
~sw: int,
|
|
425
425
|
~sh: int,
|
|
426
426
|
~options: imageBitmapOptions=?,
|
|
427
|
-
) =>
|
|
427
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
428
428
|
|
|
429
429
|
/**
|
|
430
430
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -436,7 +436,7 @@ external createImageBitmap15: (
|
|
|
436
436
|
~sw: int,
|
|
437
437
|
~sh: int,
|
|
438
438
|
~options: imageBitmapOptions=?,
|
|
439
|
-
) =>
|
|
439
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
440
440
|
|
|
441
441
|
/**
|
|
442
442
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -448,7 +448,7 @@ external createImageBitmap16: (
|
|
|
448
448
|
~sw: int,
|
|
449
449
|
~sh: int,
|
|
450
450
|
~options: imageBitmapOptions=?,
|
|
451
|
-
) =>
|
|
451
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
452
452
|
|
|
453
453
|
/**
|
|
454
454
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -460,7 +460,7 @@ external createImageBitmap17: (
|
|
|
460
460
|
~sw: int,
|
|
461
461
|
~sh: int,
|
|
462
462
|
~options: imageBitmapOptions=?,
|
|
463
|
-
) =>
|
|
463
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
464
464
|
|
|
465
465
|
/**
|
|
466
466
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -472,7 +472,7 @@ external createImageBitmap18: (
|
|
|
472
472
|
~sw: int,
|
|
473
473
|
~sh: int,
|
|
474
474
|
~options: imageBitmapOptions=?,
|
|
475
|
-
) =>
|
|
475
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
476
476
|
|
|
477
477
|
/**
|
|
478
478
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/structuredClone)
|
|
@@ -491,7 +491,7 @@ let response = await fetch("https://rescript-lang.org")
|
|
|
491
491
|
|
|
492
492
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/fetch)
|
|
493
493
|
*/
|
|
494
|
-
external fetch: (string, ~init: requestInit=?) =>
|
|
494
|
+
external fetch: (string, ~init: requestInit=?) => promise<response> = "fetch"
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
497
|
`fetch_withRequest(request, init)`
|
|
@@ -506,7 +506,7 @@ let response = await fetch(myRequest)
|
|
|
506
506
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/fetch)
|
|
507
507
|
*/
|
|
508
508
|
@send
|
|
509
|
-
external fetch_withRequest: (request, ~init: requestInit=?) =>
|
|
509
|
+
external fetch_withRequest: (request, ~init: requestInit=?) => promise<response> = "fetch"
|
|
510
510
|
|
|
511
511
|
/**
|
|
512
512
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame)
|
|
@@ -19,7 +19,7 @@ external deleteDatabase: (idbFactory, string) => idbOpenDBRequest = "deleteDatab
|
|
|
19
19
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBFactory/databases)
|
|
20
20
|
*/
|
|
21
21
|
@send
|
|
22
|
-
external databases: idbFactory =>
|
|
22
|
+
external databases: idbFactory => promise<array<idbDatabaseInfo>> = "databases"
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
|
|
@@ -7,7 +7,7 @@ open MediaCapabilitiesAPI
|
|
|
7
7
|
external decodingInfo: (
|
|
8
8
|
mediaCapabilities,
|
|
9
9
|
mediaDecodingConfiguration,
|
|
10
|
-
) =>
|
|
10
|
+
) => promise<mediaCapabilitiesDecodingInfo> = "decodingInfo"
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/encodingInfo)
|
|
@@ -16,4 +16,4 @@ external decodingInfo: (
|
|
|
16
16
|
external encodingInfo: (
|
|
17
17
|
mediaCapabilities,
|
|
18
18
|
mediaEncodingConfiguration,
|
|
19
|
-
) =>
|
|
19
|
+
) => promise<mediaCapabilitiesEncodingInfo> = "encodingInfo"
|
|
@@ -9,7 +9,7 @@ include EventTarget.Impl({
|
|
|
9
9
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices/enumerateDevices)
|
|
10
10
|
*/
|
|
11
11
|
@send
|
|
12
|
-
external enumerateDevices: mediaDevices =>
|
|
12
|
+
external enumerateDevices: mediaDevices => promise<array<mediaDeviceInfo>> = "enumerateDevices"
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices/getSupportedConstraints)
|
|
@@ -25,7 +25,7 @@ external getSupportedConstraints: mediaDevices => mediaTrackSupportedConstraints
|
|
|
25
25
|
external getUserMedia: (
|
|
26
26
|
mediaDevices,
|
|
27
27
|
~constraints: mediaStreamConstraints=?,
|
|
28
|
-
) =>
|
|
28
|
+
) => promise<mediaStream> = "getUserMedia"
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices/getDisplayMedia)
|
|
@@ -34,4 +34,4 @@ external getUserMedia: (
|
|
|
34
34
|
external getDisplayMedia: (
|
|
35
35
|
mediaDevices,
|
|
36
36
|
~options: displayMediaStreamOptions=?,
|
|
37
|
-
) =>
|
|
37
|
+
) => promise<mediaStream> = "getDisplayMedia"
|
|
@@ -16,7 +16,7 @@ include EventTarget.Impl({
|
|
|
16
16
|
@scope("Notification")
|
|
17
17
|
external requestPermission: (
|
|
18
18
|
~deprecatedCallback: notificationPermissionCallback=?,
|
|
19
|
-
) =>
|
|
19
|
+
) => promise<notificationPermission> = "requestPermission"
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Notification/close)
|
|
@@ -4,4 +4,4 @@ open PermissionsAPI
|
|
|
4
4
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Permissions/query)
|
|
5
5
|
*/
|
|
6
6
|
@send
|
|
7
|
-
external query: (permissions, permissionDescriptor) =>
|
|
7
|
+
external query: (permissions, permissionDescriptor) => promise<permissionStatus> = "query"
|
|
@@ -7,13 +7,13 @@ open PushManagerAPI
|
|
|
7
7
|
external subscribe: (
|
|
8
8
|
pushManager,
|
|
9
9
|
~options: pushSubscriptionOptionsInit=?,
|
|
10
|
-
) =>
|
|
10
|
+
) => promise<pushSubscription> = "subscribe"
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushManager/getSubscription)
|
|
14
14
|
*/
|
|
15
15
|
@send
|
|
16
|
-
external getSubscription: pushManager =>
|
|
16
|
+
external getSubscription: pushManager => promise<pushSubscription> = "getSubscription"
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushManager/permissionState)
|
|
@@ -22,4 +22,4 @@ external getSubscription: pushManager => Promise.t<pushSubscription> = "getSubsc
|
|
|
22
22
|
external permissionState: (
|
|
23
23
|
pushManager,
|
|
24
24
|
~options: pushSubscriptionOptionsInit=?,
|
|
25
|
-
) =>
|
|
25
|
+
) => promise<permissionState> = "permissionState"
|
|
@@ -10,7 +10,7 @@ external getKey: (pushSubscription, pushEncryptionKeyName) => ArrayBuffer.t = "g
|
|
|
10
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushSubscription/unsubscribe)
|
|
11
11
|
*/
|
|
12
12
|
@send
|
|
13
|
-
external unsubscribe: pushSubscription =>
|
|
13
|
+
external unsubscribe: pushSubscription => promise<bool> = "unsubscribe"
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushSubscription/toJSON)
|
|
@@ -8,18 +8,18 @@ include EventTarget.Impl({
|
|
|
8
8
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/RemotePlayback/watchAvailability)
|
|
9
9
|
*/
|
|
10
10
|
@send
|
|
11
|
-
external watchAvailability: (remotePlayback, remotePlaybackAvailabilityCallback) =>
|
|
11
|
+
external watchAvailability: (remotePlayback, remotePlaybackAvailabilityCallback) => promise<int> =
|
|
12
12
|
"watchAvailability"
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/RemotePlayback/cancelWatchAvailability)
|
|
16
16
|
*/
|
|
17
17
|
@send
|
|
18
|
-
external cancelWatchAvailability: (remotePlayback, ~id: int=?) =>
|
|
18
|
+
external cancelWatchAvailability: (remotePlayback, ~id: int=?) => promise<unit> =
|
|
19
19
|
"cancelWatchAvailability"
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/RemotePlayback/prompt)
|
|
23
23
|
*/
|
|
24
24
|
@send
|
|
25
|
-
external prompt: remotePlayback =>
|
|
25
|
+
external prompt: remotePlayback => promise<unit> = "prompt"
|
|
@@ -4,4 +4,4 @@ open ScreenWakeLockAPI
|
|
|
4
4
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WakeLock/request)
|
|
5
5
|
*/
|
|
6
6
|
@send
|
|
7
|
-
external request: (wakeLock, ~type_: wakeLockType=?) =>
|
|
7
|
+
external request: (wakeLock, ~type_: wakeLockType=?) => promise<wakeLockSentinel> = "request"
|