@rescript/webapi 0.1.0-pre-alpha-fd40382 → 0.1.0-pre-alpha-4ffc5e2
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 +2 -2
- package/src/CanvasAPI/Path2D.res +1 -27
- package/src/ChannelMessagingAPI/MessagePort.res +1 -1
- package/src/DOMAPI/CanvasRenderingContext2D.res +32 -46
- package/src/DOMAPI/CharacterData.res +3 -3
- package/src/DOMAPI/DOMMatrix.res +1 -1
- package/src/DOMAPI/DOMMatrixReadOnly.res +1 -1
- package/src/DOMAPI/Document.res +6 -6
- package/src/DOMAPI/DocumentFragment.res +3 -3
- package/src/DOMAPI/Element.res +14 -11
- package/src/DOMAPI/HTMLInputElement.res +1 -1
- package/src/DOMAPI/HTMLSelectElement.res +1 -1
- package/src/DOMAPI/HTMLSlotElement.res +1 -1
- package/src/DOMAPI/HTMLTextAreaElement.res +1 -1
- package/src/DOMAPI/Navigator.res +10 -7
- package/src/DOMAPI/StylePropertyMap.res +2 -2
- package/src/DOMAPI/VideoFrame.res +20 -11
- package/src/DOMAPI/Window.res +28 -24
- package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +2 -2
- package/src/EncryptedMediaExtensionsAPI/MediaKeyStatusMap.res +1 -1
- package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +2 -1
- package/src/FileAPI/FileSystemWritableFileStream.res +4 -4
- package/src/FileAPI/ReadableStream.res +0 -12
- package/src/Global.res +23 -23
- package/src/IndexedDBAPI/IDBDatabase.res +1 -1
- package/src/IndexedDBAPI/IDBObjectStore.res +1 -1
- package/src/MediaCaptureAndStreamsAPI/MediaStream.res +2 -2
- package/src/PerformanceAPI/Performance.res +1 -1
- package/src/ServiceWorkerAPI/Cache.res +10 -7
- package/src/ServiceWorkerAPI/ServiceWorker.res +1 -1
- package/src/WebAudioAPI/AudioNode.res +14 -8
- package/src/WebAudioAPI/OfflineAudioContext.res +5 -2
- package/src/WebCryptoAPI/SubtleCrypto.res +3 -3
- package/src/WebLocksAPI/LockManager.res +1 -1
- package/src/WebSocketsAPI/WebSocket.res +4 -4
- package/src/WebWorkersAPI/CacheStorage.res +1 -1
|
@@ -12,55 +12,64 @@ external make: (~image: htmlImageElement, ~init: videoFrameInit=?) => videoFrame
|
|
|
12
12
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
13
13
|
*/
|
|
14
14
|
@new
|
|
15
|
-
external
|
|
15
|
+
external fromSvgImage: (~image: svgImageElement, ~init: videoFrameInit=?) => videoFrame =
|
|
16
|
+
"VideoFrame"
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
19
20
|
*/
|
|
20
21
|
@new
|
|
21
|
-
external
|
|
22
|
+
external fromVideoElement: (~image: htmlVideoElement, ~init: videoFrameInit=?) => videoFrame =
|
|
23
|
+
"VideoFrame"
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
25
27
|
*/
|
|
26
28
|
@new
|
|
27
|
-
external
|
|
29
|
+
external fromCanvasElement: (~image: htmlCanvasElement, ~init: videoFrameInit=?) => videoFrame =
|
|
30
|
+
"VideoFrame"
|
|
28
31
|
|
|
29
32
|
/**
|
|
30
33
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
31
34
|
*/
|
|
32
35
|
@new
|
|
33
|
-
external
|
|
36
|
+
external fromImageBitmap: (~image: imageBitmap, ~init: videoFrameInit=?) => videoFrame =
|
|
37
|
+
"VideoFrame"
|
|
34
38
|
|
|
35
39
|
/**
|
|
36
40
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
37
41
|
*/
|
|
38
42
|
@new
|
|
39
|
-
external
|
|
43
|
+
external fromOffscreenCanvas: (~image: offscreenCanvas, ~init: videoFrameInit=?) => videoFrame =
|
|
44
|
+
"VideoFrame"
|
|
40
45
|
|
|
41
46
|
/**
|
|
42
47
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
43
48
|
*/
|
|
44
49
|
@new
|
|
45
|
-
external
|
|
50
|
+
external fromVideoFrame: (~image: videoFrame, ~init: videoFrameInit=?) => videoFrame = "VideoFrame"
|
|
46
51
|
|
|
47
52
|
/**
|
|
48
53
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
49
54
|
*/
|
|
50
55
|
@new
|
|
51
|
-
external
|
|
56
|
+
external fromArrayBuffer: (~data: ArrayBuffer.t, ~init: videoFrameBufferInit) => videoFrame =
|
|
57
|
+
"VideoFrame"
|
|
52
58
|
|
|
53
59
|
/**
|
|
54
60
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
55
61
|
*/
|
|
56
62
|
@new
|
|
57
|
-
external
|
|
63
|
+
external fromSharedArrayBuffer: (
|
|
64
|
+
~data: sharedArrayBuffer,
|
|
65
|
+
~init: videoFrameBufferInit,
|
|
66
|
+
) => videoFrame = "VideoFrame"
|
|
58
67
|
|
|
59
68
|
/**
|
|
60
69
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame)
|
|
61
70
|
*/
|
|
62
71
|
@new
|
|
63
|
-
external
|
|
72
|
+
external fromDataView: (~data: DataView.t, ~init: videoFrameBufferInit) => videoFrame = "VideoFrame"
|
|
64
73
|
|
|
65
74
|
/**
|
|
66
75
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/allocationSize)
|
|
@@ -82,7 +91,7 @@ external copyTo: (
|
|
|
82
91
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo)
|
|
83
92
|
*/
|
|
84
93
|
@send
|
|
85
|
-
external
|
|
94
|
+
external copyToSharedArrayBuffer: (
|
|
86
95
|
videoFrame,
|
|
87
96
|
~destination: sharedArrayBuffer,
|
|
88
97
|
~options: videoFrameCopyToOptions=?,
|
|
@@ -92,7 +101,7 @@ external copyTo2: (
|
|
|
92
101
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo)
|
|
93
102
|
*/
|
|
94
103
|
@send
|
|
95
|
-
external
|
|
104
|
+
external copyToDataView: (
|
|
96
105
|
videoFrame,
|
|
97
106
|
~destination: DataView.t,
|
|
98
107
|
~options: videoFrameCopyToOptions=?,
|
package/src/DOMAPI/Window.res
CHANGED
|
@@ -54,7 +54,8 @@ external setInterval: (window, ~handler: string, ~timeout: int=?) => int = "setI
|
|
|
54
54
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
|
|
55
55
|
*/
|
|
56
56
|
@send
|
|
57
|
-
external
|
|
57
|
+
external setIntervalWithCallback: (window, ~handler: unit => unit, ~timeout: int=?) => int =
|
|
58
|
+
"setInterval"
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearInterval)
|
|
@@ -82,7 +83,7 @@ external createImageBitmap: (
|
|
|
82
83
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
83
84
|
*/
|
|
84
85
|
@send
|
|
85
|
-
external
|
|
86
|
+
external createImageBitmapFromSvg: (
|
|
86
87
|
window,
|
|
87
88
|
~image: svgImageElement,
|
|
88
89
|
~options: imageBitmapOptions=?,
|
|
@@ -92,7 +93,7 @@ external createImageBitmap2: (
|
|
|
92
93
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
93
94
|
*/
|
|
94
95
|
@send
|
|
95
|
-
external
|
|
96
|
+
external createImageBitmapFromVideo: (
|
|
96
97
|
window,
|
|
97
98
|
~image: htmlVideoElement,
|
|
98
99
|
~options: imageBitmapOptions=?,
|
|
@@ -102,7 +103,7 @@ external createImageBitmap3: (
|
|
|
102
103
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
103
104
|
*/
|
|
104
105
|
@send
|
|
105
|
-
external
|
|
106
|
+
external createImageBitmapFromCanvas: (
|
|
106
107
|
window,
|
|
107
108
|
~image: htmlCanvasElement,
|
|
108
109
|
~options: imageBitmapOptions=?,
|
|
@@ -112,7 +113,7 @@ external createImageBitmap4: (
|
|
|
112
113
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
113
114
|
*/
|
|
114
115
|
@send
|
|
115
|
-
external
|
|
116
|
+
external createImageBitmapFromImageBitmap: (
|
|
116
117
|
window,
|
|
117
118
|
~image: imageBitmap,
|
|
118
119
|
~options: imageBitmapOptions=?,
|
|
@@ -122,7 +123,7 @@ external createImageBitmap5: (
|
|
|
122
123
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
123
124
|
*/
|
|
124
125
|
@send
|
|
125
|
-
external
|
|
126
|
+
external createImageBitmapFromOffscreenCanvas: (
|
|
126
127
|
window,
|
|
127
128
|
~image: offscreenCanvas,
|
|
128
129
|
~options: imageBitmapOptions=?,
|
|
@@ -132,7 +133,7 @@ external createImageBitmap6: (
|
|
|
132
133
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
133
134
|
*/
|
|
134
135
|
@send
|
|
135
|
-
external
|
|
136
|
+
external createImageBitmapFromVideoFrame: (
|
|
136
137
|
window,
|
|
137
138
|
~image: videoFrame,
|
|
138
139
|
~options: imageBitmapOptions=?,
|
|
@@ -142,7 +143,7 @@ external createImageBitmap7: (
|
|
|
142
143
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
143
144
|
*/
|
|
144
145
|
@send
|
|
145
|
-
external
|
|
146
|
+
external createImageBitmapFromBlob: (
|
|
146
147
|
window,
|
|
147
148
|
~image: blob,
|
|
148
149
|
~options: imageBitmapOptions=?,
|
|
@@ -152,7 +153,7 @@ external createImageBitmap8: (
|
|
|
152
153
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
153
154
|
*/
|
|
154
155
|
@send
|
|
155
|
-
external
|
|
156
|
+
external createImageBitmapFromImageData: (
|
|
156
157
|
window,
|
|
157
158
|
~image: imageData,
|
|
158
159
|
~options: imageBitmapOptions=?,
|
|
@@ -162,7 +163,7 @@ external createImageBitmap9: (
|
|
|
162
163
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
163
164
|
*/
|
|
164
165
|
@send
|
|
165
|
-
external
|
|
166
|
+
external createImageBitmapWithCrop: (
|
|
166
167
|
window,
|
|
167
168
|
~image: htmlImageElement,
|
|
168
169
|
~sx: int,
|
|
@@ -176,7 +177,7 @@ external createImageBitmap10: (
|
|
|
176
177
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
177
178
|
*/
|
|
178
179
|
@send
|
|
179
|
-
external
|
|
180
|
+
external createImageBitmapFromSvgWithCrop: (
|
|
180
181
|
window,
|
|
181
182
|
~image: svgImageElement,
|
|
182
183
|
~sx: int,
|
|
@@ -190,7 +191,7 @@ external createImageBitmap11: (
|
|
|
190
191
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
191
192
|
*/
|
|
192
193
|
@send
|
|
193
|
-
external
|
|
194
|
+
external createImageBitmapFromVideoWithCrop: (
|
|
194
195
|
window,
|
|
195
196
|
~image: htmlVideoElement,
|
|
196
197
|
~sx: int,
|
|
@@ -204,7 +205,7 @@ external createImageBitmap12: (
|
|
|
204
205
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
205
206
|
*/
|
|
206
207
|
@send
|
|
207
|
-
external
|
|
208
|
+
external createImageBitmapFromCanvasWithCrop: (
|
|
208
209
|
window,
|
|
209
210
|
~image: htmlCanvasElement,
|
|
210
211
|
~sx: int,
|
|
@@ -218,7 +219,7 @@ external createImageBitmap13: (
|
|
|
218
219
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
219
220
|
*/
|
|
220
221
|
@send
|
|
221
|
-
external
|
|
222
|
+
external createImageBitmapFromImageBitmapWithCrop: (
|
|
222
223
|
window,
|
|
223
224
|
~image: imageBitmap,
|
|
224
225
|
~sx: int,
|
|
@@ -232,7 +233,7 @@ external createImageBitmap14: (
|
|
|
232
233
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
233
234
|
*/
|
|
234
235
|
@send
|
|
235
|
-
external
|
|
236
|
+
external createImageBitmapFromOffscreenCanvasWithCrop: (
|
|
236
237
|
window,
|
|
237
238
|
~image: offscreenCanvas,
|
|
238
239
|
~sx: int,
|
|
@@ -246,7 +247,7 @@ external createImageBitmap15: (
|
|
|
246
247
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
247
248
|
*/
|
|
248
249
|
@send
|
|
249
|
-
external
|
|
250
|
+
external createImageBitmapFromVideoFrameWithCrop: (
|
|
250
251
|
window,
|
|
251
252
|
~image: videoFrame,
|
|
252
253
|
~sx: int,
|
|
@@ -260,7 +261,7 @@ external createImageBitmap16: (
|
|
|
260
261
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
261
262
|
*/
|
|
262
263
|
@send
|
|
263
|
-
external
|
|
264
|
+
external createImageBitmapFromBlobWithCrop: (
|
|
264
265
|
window,
|
|
265
266
|
~image: blob,
|
|
266
267
|
~sx: int,
|
|
@@ -274,7 +275,7 @@ external createImageBitmap17: (
|
|
|
274
275
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
275
276
|
*/
|
|
276
277
|
@send
|
|
277
|
-
external
|
|
278
|
+
external createImageBitmapFromImageDataWithCrop: (
|
|
278
279
|
window,
|
|
279
280
|
~image: imageData,
|
|
280
281
|
~sx: int,
|
|
@@ -369,7 +370,7 @@ external alert: window => unit = "alert"
|
|
|
369
370
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/alert)
|
|
370
371
|
*/
|
|
371
372
|
@send
|
|
372
|
-
external
|
|
373
|
+
external alertWithMessage: (window, string) => unit = "alert"
|
|
373
374
|
|
|
374
375
|
/**
|
|
375
376
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/confirm)
|
|
@@ -422,8 +423,11 @@ Throws a "DataCloneError" DOMException if transfer array contains duplicate obje
|
|
|
422
423
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/postMessage)
|
|
423
424
|
*/
|
|
424
425
|
@send
|
|
425
|
-
external
|
|
426
|
-
|
|
426
|
+
external postMessageWithOptions: (
|
|
427
|
+
window,
|
|
428
|
+
~message: JSON.t,
|
|
429
|
+
~options: windowPostMessageOptions=?,
|
|
430
|
+
) => unit = "postMessage"
|
|
427
431
|
|
|
428
432
|
/**
|
|
429
433
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/matchMedia)
|
|
@@ -465,7 +469,7 @@ external scroll: (window, ~options: scrollToOptions=?) => unit = "scroll"
|
|
|
465
469
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scroll)
|
|
466
470
|
*/
|
|
467
471
|
@send
|
|
468
|
-
external
|
|
472
|
+
external scrollXY: (window, ~x: float, ~y: float) => unit = "scroll"
|
|
469
473
|
|
|
470
474
|
/**
|
|
471
475
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollTo)
|
|
@@ -477,7 +481,7 @@ external scrollTo: (window, ~options: scrollToOptions=?) => unit = "scrollTo"
|
|
|
477
481
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollTo)
|
|
478
482
|
*/
|
|
479
483
|
@send
|
|
480
|
-
external
|
|
484
|
+
external scrollToXY: (window, ~x: float, ~y: float) => unit = "scrollTo"
|
|
481
485
|
|
|
482
486
|
/**
|
|
483
487
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollBy)
|
|
@@ -489,7 +493,7 @@ external scrollBy: (window, ~options: scrollToOptions=?) => unit = "scrollBy"
|
|
|
489
493
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollBy)
|
|
490
494
|
*/
|
|
491
495
|
@send
|
|
492
|
-
external
|
|
496
|
+
external scrollByXY: (window, ~x: float, ~y: float) => unit = "scrollBy"
|
|
493
497
|
|
|
494
498
|
/**
|
|
495
499
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/getComputedStyle)
|
|
@@ -16,7 +16,7 @@ external generateRequest: (
|
|
|
16
16
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/generateRequest)
|
|
17
17
|
*/
|
|
18
18
|
@send
|
|
19
|
-
external
|
|
19
|
+
external generateRequestWithArrayBuffer: (
|
|
20
20
|
mediaKeySession,
|
|
21
21
|
~initDataType: string,
|
|
22
22
|
~initData: ArrayBuffer.t,
|
|
@@ -38,7 +38,7 @@ external update: (mediaKeySession, DataView.t) => promise<unit> = "update"
|
|
|
38
38
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/update)
|
|
39
39
|
*/
|
|
40
40
|
@send
|
|
41
|
-
external
|
|
41
|
+
external updateWithArrayBuffer: (mediaKeySession, ArrayBuffer.t) => promise<unit> = "update"
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/close)
|
|
@@ -10,4 +10,4 @@ external has: (mediaKeyStatusMap, DataView.t) => bool = "has"
|
|
|
10
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap/has)
|
|
11
11
|
*/
|
|
12
12
|
@send
|
|
13
|
-
external
|
|
13
|
+
external hasArrayBuffer: (mediaKeyStatusMap, ArrayBuffer.t) => bool = "has"
|
|
@@ -24,4 +24,5 @@ external setServerCertificate: (mediaKeys, DataView.t) => promise<bool> = "setSe
|
|
|
24
24
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/setServerCertificate)
|
|
25
25
|
*/
|
|
26
26
|
@send
|
|
27
|
-
external
|
|
27
|
+
external setServerCertificateWithArrayBuffer: (mediaKeys, ArrayBuffer.t) => promise<bool> =
|
|
28
|
+
"setServerCertificate"
|
|
@@ -29,25 +29,25 @@ external write: (fileSystemWritableFileStream, DataView.t) => promise<unit> = "w
|
|
|
29
29
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
30
30
|
*/
|
|
31
31
|
@send
|
|
32
|
-
external
|
|
32
|
+
external writeArrayBuffer: (fileSystemWritableFileStream, ArrayBuffer.t) => promise<unit> = "write"
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
36
36
|
*/
|
|
37
37
|
@send
|
|
38
|
-
external
|
|
38
|
+
external writeBlob: (fileSystemWritableFileStream, blob) => promise<unit> = "write"
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
42
42
|
*/
|
|
43
43
|
@send
|
|
44
|
-
external
|
|
44
|
+
external writeString: (fileSystemWritableFileStream, string) => promise<unit> = "write"
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write)
|
|
48
48
|
*/
|
|
49
49
|
@send
|
|
50
|
-
external
|
|
50
|
+
external writeWithParams: (fileSystemWritableFileStream, writeParams) => promise<unit> = "write"
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/seek)
|
|
@@ -6,18 +6,6 @@ open FileTypes
|
|
|
6
6
|
@new
|
|
7
7
|
external make: unit => readableStream<array<int>> = "ReadableStream"
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
11
|
-
*/
|
|
12
|
-
@new
|
|
13
|
-
external make2: unit => unknown = "ReadableStream"
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
17
|
-
*/
|
|
18
|
-
@new
|
|
19
|
-
external make3: unit => unknown = "ReadableStream"
|
|
20
|
-
|
|
21
9
|
/**
|
|
22
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
|
|
23
11
|
*/
|
package/src/Global.res
CHANGED
|
@@ -281,7 +281,7 @@ external setInterval: (~handler: string, ~timeout: int=?) => int = "setInterval"
|
|
|
281
281
|
/**
|
|
282
282
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
|
|
283
283
|
*/
|
|
284
|
-
external
|
|
284
|
+
external setIntervalWithCallback: (~handler: unit => unit, ~timeout: int=?) => int = "setInterval"
|
|
285
285
|
|
|
286
286
|
/**
|
|
287
287
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearInterval)
|
|
@@ -304,7 +304,7 @@ external createImageBitmap: (
|
|
|
304
304
|
/**
|
|
305
305
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
306
306
|
*/
|
|
307
|
-
external
|
|
307
|
+
external createImageBitmapFromSvg: (
|
|
308
308
|
~image: svgImageElement,
|
|
309
309
|
~options: imageBitmapOptions=?,
|
|
310
310
|
) => promise<imageBitmap> = "createImageBitmap"
|
|
@@ -312,7 +312,7 @@ external createImageBitmap2: (
|
|
|
312
312
|
/**
|
|
313
313
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
314
314
|
*/
|
|
315
|
-
external
|
|
315
|
+
external createImageBitmapFromVideo: (
|
|
316
316
|
~image: htmlVideoElement,
|
|
317
317
|
~options: imageBitmapOptions=?,
|
|
318
318
|
) => promise<imageBitmap> = "createImageBitmap"
|
|
@@ -320,7 +320,7 @@ external createImageBitmap3: (
|
|
|
320
320
|
/**
|
|
321
321
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
322
322
|
*/
|
|
323
|
-
external
|
|
323
|
+
external createImageBitmapFromCanvas: (
|
|
324
324
|
~image: htmlCanvasElement,
|
|
325
325
|
~options: imageBitmapOptions=?,
|
|
326
326
|
) => promise<imageBitmap> = "createImageBitmap"
|
|
@@ -328,7 +328,7 @@ external createImageBitmap4: (
|
|
|
328
328
|
/**
|
|
329
329
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
330
330
|
*/
|
|
331
|
-
external
|
|
331
|
+
external createImageBitmapFromImageBitmap: (
|
|
332
332
|
~image: imageBitmap,
|
|
333
333
|
~options: imageBitmapOptions=?,
|
|
334
334
|
) => promise<imageBitmap> = "createImageBitmap"
|
|
@@ -336,7 +336,7 @@ external createImageBitmap5: (
|
|
|
336
336
|
/**
|
|
337
337
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
338
338
|
*/
|
|
339
|
-
external
|
|
339
|
+
external createImageBitmapFromOffscreenCanvas: (
|
|
340
340
|
~image: offscreenCanvas,
|
|
341
341
|
~options: imageBitmapOptions=?,
|
|
342
342
|
) => promise<imageBitmap> = "createImageBitmap"
|
|
@@ -344,7 +344,7 @@ external createImageBitmap6: (
|
|
|
344
344
|
/**
|
|
345
345
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
346
346
|
*/
|
|
347
|
-
external
|
|
347
|
+
external createImageBitmapFromVideoFrame: (
|
|
348
348
|
~image: videoFrame,
|
|
349
349
|
~options: imageBitmapOptions=?,
|
|
350
350
|
) => promise<imageBitmap> = "createImageBitmap"
|
|
@@ -352,7 +352,7 @@ external createImageBitmap7: (
|
|
|
352
352
|
/**
|
|
353
353
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
354
354
|
*/
|
|
355
|
-
external
|
|
355
|
+
external createImageBitmapFromBlob: (
|
|
356
356
|
~image: blob,
|
|
357
357
|
~options: imageBitmapOptions=?,
|
|
358
358
|
) => promise<imageBitmap> = "createImageBitmap"
|
|
@@ -360,7 +360,7 @@ external createImageBitmap8: (
|
|
|
360
360
|
/**
|
|
361
361
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
362
362
|
*/
|
|
363
|
-
external
|
|
363
|
+
external createImageBitmapFromImageData: (
|
|
364
364
|
~image: imageData,
|
|
365
365
|
~options: imageBitmapOptions=?,
|
|
366
366
|
) => promise<imageBitmap> = "createImageBitmap"
|
|
@@ -368,7 +368,7 @@ external createImageBitmap9: (
|
|
|
368
368
|
/**
|
|
369
369
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
370
370
|
*/
|
|
371
|
-
external
|
|
371
|
+
external createImageBitmapWithCrop: (
|
|
372
372
|
~image: htmlImageElement,
|
|
373
373
|
~sx: int,
|
|
374
374
|
~sy: int,
|
|
@@ -380,7 +380,7 @@ external createImageBitmap10: (
|
|
|
380
380
|
/**
|
|
381
381
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
382
382
|
*/
|
|
383
|
-
external
|
|
383
|
+
external createImageBitmapFromSvgWithCrop: (
|
|
384
384
|
~image: svgImageElement,
|
|
385
385
|
~sx: int,
|
|
386
386
|
~sy: int,
|
|
@@ -392,7 +392,7 @@ external createImageBitmap11: (
|
|
|
392
392
|
/**
|
|
393
393
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
394
394
|
*/
|
|
395
|
-
external
|
|
395
|
+
external createImageBitmapFromVideoWithCrop: (
|
|
396
396
|
~image: htmlVideoElement,
|
|
397
397
|
~sx: int,
|
|
398
398
|
~sy: int,
|
|
@@ -404,7 +404,7 @@ external createImageBitmap12: (
|
|
|
404
404
|
/**
|
|
405
405
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
406
406
|
*/
|
|
407
|
-
external
|
|
407
|
+
external createImageBitmapFromCanvasWithCrop: (
|
|
408
408
|
~image: htmlCanvasElement,
|
|
409
409
|
~sx: int,
|
|
410
410
|
~sy: int,
|
|
@@ -416,7 +416,7 @@ external createImageBitmap13: (
|
|
|
416
416
|
/**
|
|
417
417
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
418
418
|
*/
|
|
419
|
-
external
|
|
419
|
+
external createImageBitmapFromImageBitmapWithCrop: (
|
|
420
420
|
~image: imageBitmap,
|
|
421
421
|
~sx: int,
|
|
422
422
|
~sy: int,
|
|
@@ -428,7 +428,7 @@ external createImageBitmap14: (
|
|
|
428
428
|
/**
|
|
429
429
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
430
430
|
*/
|
|
431
|
-
external
|
|
431
|
+
external createImageBitmapFromOffscreenCanvasWithCrop: (
|
|
432
432
|
~image: offscreenCanvas,
|
|
433
433
|
~sx: int,
|
|
434
434
|
~sy: int,
|
|
@@ -440,7 +440,7 @@ external createImageBitmap15: (
|
|
|
440
440
|
/**
|
|
441
441
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
442
442
|
*/
|
|
443
|
-
external
|
|
443
|
+
external createImageBitmapFromVideoFrameWithCrop: (
|
|
444
444
|
~image: videoFrame,
|
|
445
445
|
~sx: int,
|
|
446
446
|
~sy: int,
|
|
@@ -452,7 +452,7 @@ external createImageBitmap16: (
|
|
|
452
452
|
/**
|
|
453
453
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
454
454
|
*/
|
|
455
|
-
external
|
|
455
|
+
external createImageBitmapFromBlobWithCrop: (
|
|
456
456
|
~image: blob,
|
|
457
457
|
~sx: int,
|
|
458
458
|
~sy: int,
|
|
@@ -464,7 +464,7 @@ external createImageBitmap17: (
|
|
|
464
464
|
/**
|
|
465
465
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap)
|
|
466
466
|
*/
|
|
467
|
-
external
|
|
467
|
+
external createImageBitmapFromImageDataWithCrop: (
|
|
468
468
|
~image: imageData,
|
|
469
469
|
~sx: int,
|
|
470
470
|
~sy: int,
|
|
@@ -617,7 +617,7 @@ external alert: unit => unit = "alert"
|
|
|
617
617
|
/**
|
|
618
618
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/alert)
|
|
619
619
|
*/
|
|
620
|
-
external
|
|
620
|
+
external alertWithMessage: string => unit = "alert"
|
|
621
621
|
|
|
622
622
|
/**
|
|
623
623
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/confirm)
|
|
@@ -664,7 +664,7 @@ If the origin of the target window doesn't match the given target origin, the me
|
|
|
664
664
|
Throws a "DataCloneError" DOMException if transfer array contains duplicate objects or if message could not be cloned.
|
|
665
665
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/postMessage)
|
|
666
666
|
*/
|
|
667
|
-
external
|
|
667
|
+
external postMessageWithOptions: (~message: JSON.t, ~options: windowPostMessageOptions=?) => unit =
|
|
668
668
|
"postMessage"
|
|
669
669
|
|
|
670
670
|
/**
|
|
@@ -700,7 +700,7 @@ external scroll: (~options: scrollToOptions=?) => unit = "scroll"
|
|
|
700
700
|
/**
|
|
701
701
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scroll)
|
|
702
702
|
*/
|
|
703
|
-
external
|
|
703
|
+
external scrollXY: (~x: float, ~y: float) => unit = "scroll"
|
|
704
704
|
|
|
705
705
|
/**
|
|
706
706
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollTo)
|
|
@@ -710,7 +710,7 @@ external scrollTo: (~options: scrollToOptions=?) => unit = "scrollTo"
|
|
|
710
710
|
/**
|
|
711
711
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollTo)
|
|
712
712
|
*/
|
|
713
|
-
external
|
|
713
|
+
external scrollToXY: (~x: float, ~y: float) => unit = "scrollTo"
|
|
714
714
|
|
|
715
715
|
/**
|
|
716
716
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollBy)
|
|
@@ -720,7 +720,7 @@ external scrollBy: (~options: scrollToOptions=?) => unit = "scrollBy"
|
|
|
720
720
|
/**
|
|
721
721
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollBy)
|
|
722
722
|
*/
|
|
723
|
-
external
|
|
723
|
+
external scrollByXY: (~x: float, ~y: float) => unit = "scrollBy"
|
|
724
724
|
|
|
725
725
|
/**
|
|
726
726
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/getComputedStyle)
|
|
@@ -19,7 +19,7 @@ Returns a new transaction with the given mode ("readonly" or "readwrite") and sc
|
|
|
19
19
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction)
|
|
20
20
|
*/
|
|
21
21
|
@send
|
|
22
|
-
external
|
|
22
|
+
external transactionWithStoreNames: (
|
|
23
23
|
idbDatabase,
|
|
24
24
|
~storeNames: array<string>,
|
|
25
25
|
~mode: idbTransactionMode=?,
|
|
@@ -150,7 +150,7 @@ Throws an "InvalidStateError" DOMException if not called within an upgrade trans
|
|
|
150
150
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
|
|
151
151
|
*/
|
|
152
152
|
@send
|
|
153
|
-
external
|
|
153
|
+
external createIndexWithKeyPaths: (
|
|
154
154
|
idbObjectStore,
|
|
155
155
|
~name: string,
|
|
156
156
|
~keyPath: array<string>,
|
|
@@ -10,13 +10,13 @@ external make: unit => mediaStream = "MediaStream"
|
|
|
10
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
11
11
|
*/
|
|
12
12
|
@new
|
|
13
|
-
external
|
|
13
|
+
external fromStream: mediaStream => mediaStream = "MediaStream"
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
17
17
|
*/
|
|
18
18
|
@new
|
|
19
|
-
external
|
|
19
|
+
external fromTracks: array<mediaStreamTrack> => mediaStream = "MediaStream"
|
|
20
20
|
|
|
21
21
|
include EventTarget.Impl({type t = mediaStream})
|
|
22
22
|
|
|
@@ -76,7 +76,7 @@ external measure: (
|
|
|
76
76
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/measure)
|
|
77
77
|
*/
|
|
78
78
|
@send
|
|
79
|
-
external
|
|
79
|
+
external measureWithOptions: (
|
|
80
80
|
performance,
|
|
81
81
|
~measureName: string,
|
|
82
82
|
~startOrMeasureOptions: performanceMeasureOptions=?,
|