@rescript/webapi 0.1.0-experimental-ae83778 → 0.1.0-experimental-c159a0a
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
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-c159a0a",
|
|
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",
|
|
@@ -27,7 +27,7 @@ external clear: fontFaceSet => unit = "clear"
|
|
|
27
27
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load)
|
|
28
28
|
*/
|
|
29
29
|
@send
|
|
30
|
-
external load: (fontFaceSet, ~font: string, ~text: string=?) =>
|
|
30
|
+
external load: (fontFaceSet, ~font: string, ~text: string=?) => promise<array<fontFace>> = "load"
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check)
|
|
@@ -70,7 +70,7 @@ type rec fontFace = {
|
|
|
70
70
|
/**
|
|
71
71
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/loaded)
|
|
72
72
|
*/
|
|
73
|
-
loaded:
|
|
73
|
+
loaded: promise<fontFace>,
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
@@ -81,7 +81,7 @@ type rec fontFaceSet = {
|
|
|
81
81
|
/**
|
|
82
82
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready)
|
|
83
83
|
*/
|
|
84
|
-
ready:
|
|
84
|
+
ready: promise<fontFaceSet>,
|
|
85
85
|
/**
|
|
86
86
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status)
|
|
87
87
|
*/
|
|
@@ -87,5 +87,5 @@ The argument, if provided, is a dictionary that controls the encoding options of
|
|
|
87
87
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/convertToBlob)
|
|
88
88
|
*/
|
|
89
89
|
@send
|
|
90
|
-
external convertToBlob: (offscreenCanvas, ~options: imageEncodeOptions=?) =>
|
|
90
|
+
external convertToBlob: (offscreenCanvas, ~options: imageEncodeOptions=?) => promise<blob> =
|
|
91
91
|
"convertToBlob"
|
|
@@ -8,22 +8,22 @@ include EventTarget.Impl({
|
|
|
8
8
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/read)
|
|
9
9
|
*/
|
|
10
10
|
@send
|
|
11
|
-
external read: clipboard =>
|
|
11
|
+
external read: clipboard => promise<array<clipboardItem>> = "read"
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/readText)
|
|
15
15
|
*/
|
|
16
16
|
@send
|
|
17
|
-
external readText: clipboard =>
|
|
17
|
+
external readText: clipboard => promise<string> = "readText"
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/write)
|
|
21
21
|
*/
|
|
22
22
|
@send
|
|
23
|
-
external write: (clipboard, array<clipboardItem>) =>
|
|
23
|
+
external write: (clipboard, array<clipboardItem>) => promise<unit> = "write"
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/writeText)
|
|
27
27
|
*/
|
|
28
28
|
@send
|
|
29
|
-
external writeText: (clipboard, string) =>
|
|
29
|
+
external writeText: (clipboard, string) => promise<unit> = "writeText"
|
|
@@ -12,7 +12,7 @@ external make: (~items: any, ~options: clipboardItemOptions=?) => clipboardItem
|
|
|
12
12
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ClipboardItem/getType)
|
|
13
13
|
*/
|
|
14
14
|
@send
|
|
15
|
-
external getType: (clipboardItem, string) =>
|
|
15
|
+
external getType: (clipboardItem, string) => promise<blob> = "getType"
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ClipboardItem/supports_static)
|
|
@@ -7,13 +7,13 @@ open CredentialManagementAPI
|
|
|
7
7
|
external get: (
|
|
8
8
|
credentialsContainer,
|
|
9
9
|
~options: credentialRequestOptions=?,
|
|
10
|
-
) =>
|
|
10
|
+
) => promise<credential> = "get"
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/store)
|
|
14
14
|
*/
|
|
15
15
|
@send
|
|
16
|
-
external store: (credentialsContainer, credential) =>
|
|
16
|
+
external store: (credentialsContainer, credential) => promise<unit> = "store"
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/create)
|
|
@@ -22,10 +22,10 @@ external store: (credentialsContainer, credential) => Promise.t<unit> = "store"
|
|
|
22
22
|
external create: (
|
|
23
23
|
credentialsContainer,
|
|
24
24
|
~options: credentialCreationOptions=?,
|
|
25
|
-
) =>
|
|
25
|
+
) => promise<credential> = "create"
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/preventSilentAccess)
|
|
29
29
|
*/
|
|
30
30
|
@send
|
|
31
|
-
external preventSilentAccess: credentialsContainer =>
|
|
31
|
+
external preventSilentAccess: credentialsContainer => promise<unit> = "preventSilentAccess"
|
|
@@ -23,7 +23,7 @@ external deleteRule: (cssStyleSheet, int) => unit = "deleteRule"
|
|
|
23
23
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replace)
|
|
24
24
|
*/
|
|
25
25
|
@send
|
|
26
|
-
external replace: (cssStyleSheet, string) =>
|
|
26
|
+
external replace: (cssStyleSheet, string) => promise<cssStyleSheet> = "replace"
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replaceSync)
|
|
@@ -21,7 +21,7 @@ external getName: (customElementRegistry, customElementConstructor) => string =
|
|
|
21
21
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/whenDefined)
|
|
22
22
|
*/
|
|
23
23
|
@send
|
|
24
|
-
external whenDefined: (customElementRegistry, string) =>
|
|
24
|
+
external whenDefined: (customElementRegistry, string) => promise<customElementConstructor> =
|
|
25
25
|
"whenDefined"
|
|
26
26
|
|
|
27
27
|
/**
|
package/src/DOMAPI/Document.res
CHANGED
|
@@ -360,7 +360,7 @@ Stops document's fullscreen element from being displayed fullscreen and resolves
|
|
|
360
360
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/exitFullscreen)
|
|
361
361
|
*/
|
|
362
362
|
@send
|
|
363
|
-
external exitFullscreen: document =>
|
|
363
|
+
external exitFullscreen: document => promise<unit> = "exitFullscreen"
|
|
364
364
|
|
|
365
365
|
/**
|
|
366
366
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/parseHTMLUnsafe_static)
|
|
@@ -432,7 +432,7 @@ external hasFocus: document => bool = "hasFocus"
|
|
|
432
432
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/exitPictureInPicture)
|
|
433
433
|
*/
|
|
434
434
|
@send
|
|
435
|
-
external exitPictureInPicture: document =>
|
|
435
|
+
external exitPictureInPicture: document => promise<unit> = "exitPictureInPicture"
|
|
436
436
|
|
|
437
437
|
/**
|
|
438
438
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/exitPointerLock)
|
|
@@ -451,10 +451,10 @@ external getSelection: document => selection = "getSelection"
|
|
|
451
451
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/hasStorageAccess)
|
|
452
452
|
*/
|
|
453
453
|
@send
|
|
454
|
-
external hasStorageAccess: document =>
|
|
454
|
+
external hasStorageAccess: document => promise<bool> = "hasStorageAccess"
|
|
455
455
|
|
|
456
456
|
/**
|
|
457
457
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess)
|
|
458
458
|
*/
|
|
459
459
|
@send
|
|
460
|
-
external requestStorageAccess: document =>
|
|
460
|
+
external requestStorageAccess: document => promise<unit> = "requestStorageAccess"
|
package/src/DOMAPI/Element.res
CHANGED
|
@@ -353,14 +353,14 @@ When supplied, options's navigationUI member indicates whether showing navigatio
|
|
|
353
353
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestFullscreen)
|
|
354
354
|
*/
|
|
355
355
|
@send
|
|
356
|
-
external requestFullscreen: (T.t, ~options: fullscreenOptions=?) =>
|
|
356
|
+
external requestFullscreen: (T.t, ~options: fullscreenOptions=?) => promise<unit> =
|
|
357
357
|
"requestFullscreen"
|
|
358
358
|
|
|
359
359
|
/**
|
|
360
360
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestPointerLock)
|
|
361
361
|
*/
|
|
362
362
|
@send
|
|
363
|
-
external requestPointerLock: (T.t, ~options: pointerLockOptions=?) =>
|
|
363
|
+
external requestPointerLock: (T.t, ~options: pointerLockOptions=?) => promise<unit> =
|
|
364
364
|
"requestPointerLock"
|
|
365
365
|
|
|
366
366
|
/**
|
|
@@ -56,19 +56,19 @@ Loads and starts playback of a media resource.
|
|
|
56
56
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/play)
|
|
57
57
|
*/
|
|
58
58
|
@send
|
|
59
|
-
external play: T.t =>
|
|
59
|
+
external play: T.t => promise<unit> = "play"
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setMediaKeys)
|
|
63
63
|
*/
|
|
64
64
|
@send
|
|
65
|
-
external setMediaKeys: (T.t, mediaKeys) =>
|
|
65
|
+
external setMediaKeys: (T.t, mediaKeys) => promise<unit> = "setMediaKeys"
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setSinkId)
|
|
69
69
|
*/
|
|
70
70
|
@send
|
|
71
|
-
external setSinkId: (T.t, string) =>
|
|
71
|
+
external setSinkId: (T.t, string) => promise<unit> = "setSinkId"
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
include Impl({
|
|
@@ -16,7 +16,7 @@ external getVideoPlaybackQuality: htmlVideoElement => videoPlaybackQuality =
|
|
|
16
16
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/requestPictureInPicture)
|
|
17
17
|
*/
|
|
18
18
|
@send
|
|
19
|
-
external requestPictureInPicture: htmlVideoElement =>
|
|
19
|
+
external requestPictureInPicture: htmlVideoElement => promise<pictureInPictureWindow> =
|
|
20
20
|
"requestPictureInPicture"
|
|
21
21
|
|
|
22
22
|
/**
|
package/src/DOMAPI/Navigator.res
CHANGED
|
@@ -9,13 +9,13 @@ open WebMIDIAPI
|
|
|
9
9
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/setAppBadge)
|
|
10
10
|
*/
|
|
11
11
|
@send
|
|
12
|
-
external setAppBadge: (navigator, ~contents: int=?) =>
|
|
12
|
+
external setAppBadge: (navigator, ~contents: int=?) => promise<unit> = "setAppBadge"
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/clearAppBadge)
|
|
16
16
|
*/
|
|
17
17
|
@send
|
|
18
|
-
external clearAppBadge: navigator =>
|
|
18
|
+
external clearAppBadge: navigator => promise<unit> = "clearAppBadge"
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)
|
|
@@ -74,7 +74,7 @@ external requestMediaKeySystemAccess: (
|
|
|
74
74
|
navigator,
|
|
75
75
|
~keySystem: string,
|
|
76
76
|
~supportedConfigurations: array<mediaKeySystemConfiguration>,
|
|
77
|
-
) =>
|
|
77
|
+
) => promise<mediaKeySystemAccess> = "requestMediaKeySystemAccess"
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/getGamepads)
|
|
@@ -98,7 +98,7 @@ external vibrate2: (navigator, array<int>) => bool = "vibrate"
|
|
|
98
98
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/share)
|
|
99
99
|
*/
|
|
100
100
|
@send
|
|
101
|
-
external share: (navigator, ~data: shareData=?) =>
|
|
101
|
+
external share: (navigator, ~data: shareData=?) => promise<unit> = "share"
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/canShare)
|
|
@@ -110,5 +110,5 @@ external canShare: (navigator, ~data: shareData=?) => bool = "canShare"
|
|
|
110
110
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/requestMIDIAccess)
|
|
111
111
|
*/
|
|
112
112
|
@send
|
|
113
|
-
external requestMIDIAccess: (navigator, ~options: midiOptions=?) =>
|
|
113
|
+
external requestMIDIAccess: (navigator, ~options: midiOptions=?) => promise<midiAccess> =
|
|
114
114
|
"requestMIDIAccess"
|
|
@@ -76,7 +76,7 @@ external copyTo: (
|
|
|
76
76
|
videoFrame,
|
|
77
77
|
~destination: ArrayBuffer.t,
|
|
78
78
|
~options: videoFrameCopyToOptions=?,
|
|
79
|
-
) =>
|
|
79
|
+
) => promise<array<planeLayout>> = "copyTo"
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo)
|
|
@@ -86,7 +86,7 @@ external copyTo2: (
|
|
|
86
86
|
videoFrame,
|
|
87
87
|
~destination: sharedArrayBuffer,
|
|
88
88
|
~options: videoFrameCopyToOptions=?,
|
|
89
|
-
) =>
|
|
89
|
+
) => promise<array<planeLayout>> = "copyTo"
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo)
|
|
@@ -96,7 +96,7 @@ external copyTo3: (
|
|
|
96
96
|
videoFrame,
|
|
97
97
|
~destination: DataView.t,
|
|
98
98
|
~options: videoFrameCopyToOptions=?,
|
|
99
|
-
) =>
|
|
99
|
+
) => promise<array<planeLayout>> = "copyTo"
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/clone)
|
package/src/DOMAPI/Window.res
CHANGED
|
@@ -78,7 +78,7 @@ external createImageBitmap: (
|
|
|
78
78
|
window,
|
|
79
79
|
~image: htmlImageElement,
|
|
80
80
|
~options: imageBitmapOptions=?,
|
|
81
|
-
) =>
|
|
81
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -88,7 +88,7 @@ external createImageBitmap2: (
|
|
|
88
88
|
window,
|
|
89
89
|
~image: svgImageElement,
|
|
90
90
|
~options: imageBitmapOptions=?,
|
|
91
|
-
) =>
|
|
91
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -98,7 +98,7 @@ external createImageBitmap3: (
|
|
|
98
98
|
window,
|
|
99
99
|
~image: htmlVideoElement,
|
|
100
100
|
~options: imageBitmapOptions=?,
|
|
101
|
-
) =>
|
|
101
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -108,7 +108,7 @@ external createImageBitmap4: (
|
|
|
108
108
|
window,
|
|
109
109
|
~image: htmlCanvasElement,
|
|
110
110
|
~options: imageBitmapOptions=?,
|
|
111
|
-
) =>
|
|
111
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -118,7 +118,7 @@ external createImageBitmap5: (
|
|
|
118
118
|
window,
|
|
119
119
|
~image: imageBitmap,
|
|
120
120
|
~options: imageBitmapOptions=?,
|
|
121
|
-
) =>
|
|
121
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -128,7 +128,7 @@ external createImageBitmap6: (
|
|
|
128
128
|
window,
|
|
129
129
|
~image: offscreenCanvas,
|
|
130
130
|
~options: imageBitmapOptions=?,
|
|
131
|
-
) =>
|
|
131
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -138,7 +138,7 @@ external createImageBitmap7: (
|
|
|
138
138
|
window,
|
|
139
139
|
~image: videoFrame,
|
|
140
140
|
~options: imageBitmapOptions=?,
|
|
141
|
-
) =>
|
|
141
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -148,7 +148,7 @@ external createImageBitmap8: (
|
|
|
148
148
|
window,
|
|
149
149
|
~image: blob,
|
|
150
150
|
~options: imageBitmapOptions=?,
|
|
151
|
-
) =>
|
|
151
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -158,7 +158,7 @@ external createImageBitmap9: (
|
|
|
158
158
|
window,
|
|
159
159
|
~image: imageData,
|
|
160
160
|
~options: imageBitmapOptions=?,
|
|
161
|
-
) =>
|
|
161
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
164
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -172,7 +172,7 @@ external createImageBitmap10: (
|
|
|
172
172
|
~sw: int,
|
|
173
173
|
~sh: int,
|
|
174
174
|
~options: imageBitmapOptions=?,
|
|
175
|
-
) =>
|
|
175
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -186,7 +186,7 @@ external createImageBitmap11: (
|
|
|
186
186
|
~sw: int,
|
|
187
187
|
~sh: int,
|
|
188
188
|
~options: imageBitmapOptions=?,
|
|
189
|
-
) =>
|
|
189
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
192
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -200,7 +200,7 @@ external createImageBitmap12: (
|
|
|
200
200
|
~sw: int,
|
|
201
201
|
~sh: int,
|
|
202
202
|
~options: imageBitmapOptions=?,
|
|
203
|
-
) =>
|
|
203
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
206
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -214,7 +214,7 @@ external createImageBitmap13: (
|
|
|
214
214
|
~sw: int,
|
|
215
215
|
~sh: int,
|
|
216
216
|
~options: imageBitmapOptions=?,
|
|
217
|
-
) =>
|
|
217
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -228,7 +228,7 @@ external createImageBitmap14: (
|
|
|
228
228
|
~sw: int,
|
|
229
229
|
~sh: int,
|
|
230
230
|
~options: imageBitmapOptions=?,
|
|
231
|
-
) =>
|
|
231
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
234
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -242,7 +242,7 @@ external createImageBitmap15: (
|
|
|
242
242
|
~sw: int,
|
|
243
243
|
~sh: int,
|
|
244
244
|
~options: imageBitmapOptions=?,
|
|
245
|
-
) =>
|
|
245
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -256,7 +256,7 @@ external createImageBitmap16: (
|
|
|
256
256
|
~sw: int,
|
|
257
257
|
~sh: int,
|
|
258
258
|
~options: imageBitmapOptions=?,
|
|
259
|
-
) =>
|
|
259
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
260
260
|
|
|
261
261
|
/**
|
|
262
262
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -270,7 +270,7 @@ external createImageBitmap17: (
|
|
|
270
270
|
~sw: int,
|
|
271
271
|
~sh: int,
|
|
272
272
|
~options: imageBitmapOptions=?,
|
|
273
|
-
) =>
|
|
273
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
274
274
|
|
|
275
275
|
/**
|
|
276
276
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
@@ -284,7 +284,7 @@ external createImageBitmap18: (
|
|
|
284
284
|
~sw: int,
|
|
285
285
|
~sh: int,
|
|
286
286
|
~options: imageBitmapOptions=?,
|
|
287
|
-
) =>
|
|
287
|
+
) => promise<imageBitmap> = "createImageBitmap"
|
|
288
288
|
|
|
289
289
|
/**
|
|
290
290
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/structuredClone)
|
|
@@ -306,7 +306,7 @@ let response = await window->Window.fetch("https://rescript-lang.org")
|
|
|
306
306
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/fetch)
|
|
307
307
|
*/
|
|
308
308
|
@send
|
|
309
|
-
external fetch: (window, string, ~init: requestInit=?) =>
|
|
309
|
+
external fetch: (window, string, ~init: requestInit=?) => promise<response> = "fetch"
|
|
310
310
|
|
|
311
311
|
/**
|
|
312
312
|
`fetch_withRequest(window, request, init)`
|
|
@@ -320,7 +320,7 @@ let response = await window->Window.fetch(myRequest)
|
|
|
320
320
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/fetch)
|
|
321
321
|
*/
|
|
322
322
|
@send
|
|
323
|
-
external fetch_withRequest: (window, request, ~init: requestInit=?) =>
|
|
323
|
+
external fetch_withRequest: (window, request, ~init: requestInit=?) => promise<response> = "fetch"
|
|
324
324
|
|
|
325
325
|
/**
|
|
326
326
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame)
|
package/src/DOMAPI.res
CHANGED
|
@@ -9524,11 +9524,11 @@ type rec animation = {
|
|
|
9524
9524
|
/**
|
|
9525
9525
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Animation/ready)
|
|
9526
9526
|
*/
|
|
9527
|
-
ready:
|
|
9527
|
+
ready: promise<animation>,
|
|
9528
9528
|
/**
|
|
9529
9529
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Animation/finished)
|
|
9530
9530
|
*/
|
|
9531
|
-
finished:
|
|
9531
|
+
finished: promise<animation>,
|
|
9532
9532
|
/**
|
|
9533
9533
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Animation/startTime)
|
|
9534
9534
|
*/
|
|
@@ -12,7 +12,7 @@ external generateRequest: (
|
|
|
12
12
|
mediaKeySession,
|
|
13
13
|
~initDataType: string,
|
|
14
14
|
~initData: DataView.t,
|
|
15
|
-
) =>
|
|
15
|
+
) => promise<unit> = "generateRequest"
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/generateRequest)
|
|
@@ -22,34 +22,34 @@ external generateRequest2: (
|
|
|
22
22
|
mediaKeySession,
|
|
23
23
|
~initDataType: string,
|
|
24
24
|
~initData: ArrayBuffer.t,
|
|
25
|
-
) =>
|
|
25
|
+
) => promise<unit> = "generateRequest"
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/load)
|
|
29
29
|
*/
|
|
30
30
|
@send
|
|
31
|
-
external load: (mediaKeySession, string) =>
|
|
31
|
+
external load: (mediaKeySession, string) => promise<bool> = "load"
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/update)
|
|
35
35
|
*/
|
|
36
36
|
@send
|
|
37
|
-
external update: (mediaKeySession, DataView.t) =>
|
|
37
|
+
external update: (mediaKeySession, DataView.t) => promise<unit> = "update"
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/update)
|
|
41
41
|
*/
|
|
42
42
|
@send
|
|
43
|
-
external update2: (mediaKeySession, ArrayBuffer.t) =>
|
|
43
|
+
external update2: (mediaKeySession, ArrayBuffer.t) => promise<unit> = "update"
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/close)
|
|
47
47
|
*/
|
|
48
48
|
@send
|
|
49
|
-
external close: mediaKeySession =>
|
|
49
|
+
external close: mediaKeySession => promise<unit> = "close"
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/remove)
|
|
53
53
|
*/
|
|
54
54
|
@send
|
|
55
|
-
external remove: mediaKeySession =>
|
|
55
|
+
external remove: mediaKeySession => promise<unit> = "remove"
|
|
@@ -10,4 +10,4 @@ external getConfiguration: mediaKeySystemAccess => mediaKeySystemConfiguration =
|
|
|
10
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess/createMediaKeys)
|
|
11
11
|
*/
|
|
12
12
|
@send
|
|
13
|
-
external createMediaKeys: mediaKeySystemAccess =>
|
|
13
|
+
external createMediaKeys: mediaKeySystemAccess => promise<mediaKeys> = "createMediaKeys"
|
|
@@ -11,18 +11,18 @@ external createSession: (mediaKeys, ~sessionType: mediaKeySessionType=?) => medi
|
|
|
11
11
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/getStatusForPolicy)
|
|
12
12
|
*/
|
|
13
13
|
@send
|
|
14
|
-
external getStatusForPolicy: (mediaKeys, ~policy: mediaKeysPolicy=?) =>
|
|
14
|
+
external getStatusForPolicy: (mediaKeys, ~policy: mediaKeysPolicy=?) => promise<mediaKeyStatus> =
|
|
15
15
|
"getStatusForPolicy"
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/setServerCertificate)
|
|
19
19
|
*/
|
|
20
20
|
@send
|
|
21
|
-
external setServerCertificate: (mediaKeys, DataView.t) =>
|
|
21
|
+
external setServerCertificate: (mediaKeys, DataView.t) => promise<bool> = "setServerCertificate"
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/setServerCertificate)
|
|
25
25
|
*/
|
|
26
26
|
@send
|
|
27
|
-
external setServerCertificate2: (mediaKeys, ArrayBuffer.t) =>
|
|
27
|
+
external setServerCertificate2: (mediaKeys, ArrayBuffer.t) => promise<bool> =
|
|
28
28
|
"setServerCertificate"
|
|
@@ -74,7 +74,7 @@ type mediaKeySession = {
|
|
|
74
74
|
/**
|
|
75
75
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/closed)
|
|
76
76
|
*/
|
|
77
|
-
closed:
|
|
77
|
+
closed: promise<mediaKeySessionClosedReason>,
|
|
78
78
|
/**
|
|
79
79
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/keyStatuses)
|
|
80
80
|
*/
|
package/src/FetchAPI/Request.res
CHANGED
|
@@ -18,37 +18,37 @@ external make2: (~input: string, ~init: requestInit=?) => request = "Request"
|
|
|
18
18
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer)
|
|
19
19
|
*/
|
|
20
20
|
@send
|
|
21
|
-
external arrayBuffer: request =>
|
|
21
|
+
external arrayBuffer: request => promise<ArrayBuffer.t> = "arrayBuffer"
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/blob)
|
|
25
25
|
*/
|
|
26
26
|
@send
|
|
27
|
-
external blob: request =>
|
|
27
|
+
external blob: request => promise<blob> = "blob"
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/bytes)
|
|
31
31
|
*/
|
|
32
32
|
@send
|
|
33
|
-
external bytes: request =>
|
|
33
|
+
external bytes: request => promise<array<int>> = "bytes"
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/formData)
|
|
37
37
|
*/
|
|
38
38
|
@send
|
|
39
|
-
external formData: request =>
|
|
39
|
+
external formData: request => promise<formData> = "formData"
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/json)
|
|
43
43
|
*/
|
|
44
44
|
@send
|
|
45
|
-
external json: request =>
|
|
45
|
+
external json: request => promise<JSON.t> = "json"
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/text)
|
|
49
49
|
*/
|
|
50
50
|
@send
|
|
51
|
-
external text: request =>
|
|
51
|
+
external text: request => promise<string> = "text"
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/clone)
|