@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
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ external make: (~family: string, ~source: string, ~descriptors: fontFaceDescript
|
|
|
11
11
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace)
|
|
12
12
|
*/
|
|
13
13
|
@new
|
|
14
|
-
external
|
|
14
|
+
external fromDataView: (
|
|
15
15
|
~family: string,
|
|
16
16
|
~source: DataView.t,
|
|
17
17
|
~descriptors: fontFaceDescriptors=?,
|
|
@@ -21,7 +21,7 @@ external make2: (
|
|
|
21
21
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace)
|
|
22
22
|
*/
|
|
23
23
|
@new
|
|
24
|
-
external
|
|
24
|
+
external fromArrayBuffer: (
|
|
25
25
|
~family: string,
|
|
26
26
|
~source: ArrayBuffer.t,
|
|
27
27
|
~descriptors: fontFaceDescriptors=?,
|
package/src/CanvasAPI/Path2D.res
CHANGED
|
@@ -11,7 +11,7 @@ external make: (~path: path2D=?) => path2D = "Path2D"
|
|
|
11
11
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Path2D)
|
|
12
12
|
*/
|
|
13
13
|
@new
|
|
14
|
-
external
|
|
14
|
+
external fromString: (~path: string=?) => path2D = "Path2D"
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/closePath)
|
|
@@ -78,32 +78,6 @@ external roundRect: (
|
|
|
78
78
|
~radii_: array<float>=?,
|
|
79
79
|
) => unit = "roundRect"
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
|
|
83
|
-
*/
|
|
84
|
-
@send
|
|
85
|
-
external roundRect2: (
|
|
86
|
-
path2D,
|
|
87
|
-
~x: float,
|
|
88
|
-
~y: float,
|
|
89
|
-
~w: float,
|
|
90
|
-
~h: float,
|
|
91
|
-
~radii_: array<float>=?,
|
|
92
|
-
) => unit = "roundRect"
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
|
|
96
|
-
*/
|
|
97
|
-
@send
|
|
98
|
-
external roundRect3: (
|
|
99
|
-
path2D,
|
|
100
|
-
~x: float,
|
|
101
|
-
~y: float,
|
|
102
|
-
~w: float,
|
|
103
|
-
~h: float,
|
|
104
|
-
~radii_: array<float>=?,
|
|
105
|
-
) => unit = "roundRect"
|
|
106
|
-
|
|
107
81
|
/**
|
|
108
82
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arc)
|
|
109
83
|
*/
|
|
@@ -19,7 +19,7 @@ Throws a "DataCloneError" DOMException if transfer contains duplicate objects or
|
|
|
19
19
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
20
20
|
*/
|
|
21
21
|
@send
|
|
22
|
-
external
|
|
22
|
+
external postMessageWithOptions: (
|
|
23
23
|
messagePort,
|
|
24
24
|
~message: JSON.t,
|
|
25
25
|
~options: structuredSerializeOptions=?,
|
|
@@ -81,7 +81,7 @@ external setTransform: (
|
|
|
81
81
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setTransform)
|
|
82
82
|
*/
|
|
83
83
|
@send
|
|
84
|
-
external
|
|
84
|
+
external setTransformWithMatrix: (canvasRenderingContext2D, ~transform: domMatrix2DInit=?) => unit =
|
|
85
85
|
"setTransform"
|
|
86
86
|
|
|
87
87
|
/**
|
|
@@ -141,7 +141,7 @@ external createPattern: (
|
|
|
141
141
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
142
142
|
*/
|
|
143
143
|
@send
|
|
144
|
-
external
|
|
144
|
+
external createPatternFromSvg: (
|
|
145
145
|
canvasRenderingContext2D,
|
|
146
146
|
~image: svgImageElement,
|
|
147
147
|
~repetition: string,
|
|
@@ -151,7 +151,7 @@ external createPattern2: (
|
|
|
151
151
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
152
152
|
*/
|
|
153
153
|
@send
|
|
154
|
-
external
|
|
154
|
+
external createPatternFromVideo: (
|
|
155
155
|
canvasRenderingContext2D,
|
|
156
156
|
~image: htmlVideoElement,
|
|
157
157
|
~repetition: string,
|
|
@@ -161,7 +161,7 @@ external createPattern3: (
|
|
|
161
161
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
162
162
|
*/
|
|
163
163
|
@send
|
|
164
|
-
external
|
|
164
|
+
external createPatternFromCanvas: (
|
|
165
165
|
canvasRenderingContext2D,
|
|
166
166
|
~image: htmlCanvasElement,
|
|
167
167
|
~repetition: string,
|
|
@@ -171,7 +171,7 @@ external createPattern4: (
|
|
|
171
171
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
172
172
|
*/
|
|
173
173
|
@send
|
|
174
|
-
external
|
|
174
|
+
external createPatternFromImageBitmap: (
|
|
175
175
|
canvasRenderingContext2D,
|
|
176
176
|
~image: imageBitmap,
|
|
177
177
|
~repetition: string,
|
|
@@ -181,7 +181,7 @@ external createPattern5: (
|
|
|
181
181
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
182
182
|
*/
|
|
183
183
|
@send
|
|
184
|
-
external
|
|
184
|
+
external createPatternFromOffscreenCanvas: (
|
|
185
185
|
canvasRenderingContext2D,
|
|
186
186
|
~image: offscreenCanvas,
|
|
187
187
|
~repetition: string,
|
|
@@ -191,7 +191,7 @@ external createPattern6: (
|
|
|
191
191
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
192
192
|
*/
|
|
193
193
|
@send
|
|
194
|
-
external
|
|
194
|
+
external createPatternFromVideoFrame: (
|
|
195
195
|
canvasRenderingContext2D,
|
|
196
196
|
~image: videoFrame,
|
|
197
197
|
~repetition: string,
|
|
@@ -239,8 +239,11 @@ external fill: (canvasRenderingContext2D, ~fillRule: canvasFillRule=?) => unit =
|
|
|
239
239
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fill)
|
|
240
240
|
*/
|
|
241
241
|
@send
|
|
242
|
-
external
|
|
243
|
-
|
|
242
|
+
external fillWithPath: (
|
|
243
|
+
canvasRenderingContext2D,
|
|
244
|
+
~path: path2D,
|
|
245
|
+
~fillRule: canvasFillRule=?,
|
|
246
|
+
) => unit = "fill"
|
|
244
247
|
|
|
245
248
|
/**
|
|
246
249
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke)
|
|
@@ -252,7 +255,7 @@ external stroke: canvasRenderingContext2D => unit = "stroke"
|
|
|
252
255
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke)
|
|
253
256
|
*/
|
|
254
257
|
@send
|
|
255
|
-
external
|
|
258
|
+
external strokeWithPath: (canvasRenderingContext2D, path2D) => unit = "stroke"
|
|
256
259
|
|
|
257
260
|
/**
|
|
258
261
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip)
|
|
@@ -264,8 +267,11 @@ external clip: (canvasRenderingContext2D, ~fillRule: canvasFillRule=?) => unit =
|
|
|
264
267
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip)
|
|
265
268
|
*/
|
|
266
269
|
@send
|
|
267
|
-
external
|
|
268
|
-
|
|
270
|
+
external clipWithPath: (
|
|
271
|
+
canvasRenderingContext2D,
|
|
272
|
+
~path: path2D,
|
|
273
|
+
~fillRule: canvasFillRule=?,
|
|
274
|
+
) => unit = "clip"
|
|
269
275
|
|
|
270
276
|
/**
|
|
271
277
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath)
|
|
@@ -282,7 +288,7 @@ external isPointInPath: (
|
|
|
282
288
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath)
|
|
283
289
|
*/
|
|
284
290
|
@send
|
|
285
|
-
external
|
|
291
|
+
external isPointInPathWithPath: (
|
|
286
292
|
canvasRenderingContext2D,
|
|
287
293
|
~path: path2D,
|
|
288
294
|
~x: float,
|
|
@@ -301,8 +307,12 @@ external isPointInStroke: (canvasRenderingContext2D, ~x: float, ~y: float) => bo
|
|
|
301
307
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke)
|
|
302
308
|
*/
|
|
303
309
|
@send
|
|
304
|
-
external
|
|
305
|
-
|
|
310
|
+
external isPointInStrokeWithPath: (
|
|
311
|
+
canvasRenderingContext2D,
|
|
312
|
+
~path: path2D,
|
|
313
|
+
~x: float,
|
|
314
|
+
~y: float,
|
|
315
|
+
) => bool = "isPointInStroke"
|
|
306
316
|
|
|
307
317
|
/**
|
|
308
318
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded)
|
|
@@ -314,8 +324,11 @@ external drawFocusIfNeeded: (canvasRenderingContext2D, element) => unit = "drawF
|
|
|
314
324
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded)
|
|
315
325
|
*/
|
|
316
326
|
@send
|
|
317
|
-
external
|
|
318
|
-
|
|
327
|
+
external drawFocusIfNeededWithPath: (
|
|
328
|
+
canvasRenderingContext2D,
|
|
329
|
+
~path: path2D,
|
|
330
|
+
~element: element,
|
|
331
|
+
) => unit = "drawFocusIfNeeded"
|
|
319
332
|
|
|
320
333
|
/**
|
|
321
334
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillText)
|
|
@@ -649,7 +662,7 @@ external createImageData: (
|
|
|
649
662
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createImageData)
|
|
650
663
|
*/
|
|
651
664
|
@send
|
|
652
|
-
external
|
|
665
|
+
external createImageDataFrom: (canvasRenderingContext2D, imageData) => imageData = "createImageData"
|
|
653
666
|
|
|
654
667
|
/**
|
|
655
668
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getImageData)
|
|
@@ -679,7 +692,7 @@ external putImageData: (
|
|
|
679
692
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/putImageData)
|
|
680
693
|
*/
|
|
681
694
|
@send
|
|
682
|
-
external
|
|
695
|
+
external putImageDataWithDirtyRect: (
|
|
683
696
|
canvasRenderingContext2D,
|
|
684
697
|
~imagedata: imageData,
|
|
685
698
|
~dx: int,
|
|
@@ -780,33 +793,6 @@ external roundRect: (
|
|
|
780
793
|
) => unit = "roundRect"
|
|
781
794
|
|
|
782
795
|
/**
|
|
783
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
|
|
784
|
-
*/
|
|
785
|
-
@send
|
|
786
|
-
external roundRect2: (
|
|
787
|
-
canvasRenderingContext2D,
|
|
788
|
-
~x: float,
|
|
789
|
-
~y: float,
|
|
790
|
-
~w: float,
|
|
791
|
-
~h: float,
|
|
792
|
-
~radii_: array<float>=?,
|
|
793
|
-
) => unit = "roundRect"
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
|
|
797
|
-
*/
|
|
798
|
-
@send
|
|
799
|
-
external roundRect3: (
|
|
800
|
-
canvasRenderingContext2D,
|
|
801
|
-
~x: float,
|
|
802
|
-
~y: float,
|
|
803
|
-
~w: float,
|
|
804
|
-
~h: float,
|
|
805
|
-
~radii_: array<float>=?,
|
|
806
|
-
) => unit = "roundRect"
|
|
807
|
-
|
|
808
|
-
/**
|
|
809
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arc)
|
|
810
796
|
*/
|
|
811
797
|
@send
|
|
812
798
|
external arc: (
|
|
@@ -25,7 +25,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
25
25
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/after)
|
|
26
26
|
*/
|
|
27
27
|
@send
|
|
28
|
-
external
|
|
28
|
+
external afterText: (T.t, string) => unit = "after"
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/appendData)
|
|
@@ -49,7 +49,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
49
49
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/before)
|
|
50
50
|
*/
|
|
51
51
|
@send
|
|
52
|
-
external
|
|
52
|
+
external beforeText: (T.t, string) => unit = "before"
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/deleteData)
|
|
@@ -92,7 +92,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
92
92
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceWith)
|
|
93
93
|
*/
|
|
94
94
|
@send
|
|
95
|
-
external
|
|
95
|
+
external replaceWithText: (T.t, string) => unit = "replaceWith"
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/substringData)
|
package/src/DOMAPI/DOMMatrix.res
CHANGED
|
@@ -11,7 +11,7 @@ external make: (~init: string=?) => domMatrix = "DOMMatrix"
|
|
|
11
11
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrix)
|
|
12
12
|
*/
|
|
13
13
|
@new
|
|
14
|
-
external
|
|
14
|
+
external fromFloatArray: (~init: array<float>=?) => domMatrix = "DOMMatrix"
|
|
15
15
|
|
|
16
16
|
external asDOMMatrixReadOnly: domMatrix => domMatrixReadOnly = "%identity"
|
|
17
17
|
@scope("DOMMatrix")
|
|
@@ -11,7 +11,7 @@ external make: (~init: string=?) => domMatrixReadOnly = "DOMMatrixReadOnly"
|
|
|
11
11
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly)
|
|
12
12
|
*/
|
|
13
13
|
@new
|
|
14
|
-
external
|
|
14
|
+
external fromFloatArray: (~init: array<float>=?) => domMatrixReadOnly = "DOMMatrixReadOnly"
|
|
15
15
|
|
|
16
16
|
@scope("DOMMatrixReadOnly")
|
|
17
17
|
external fromMatrix: (~other: domMatrixInit=?) => domMatrixReadOnly = "fromMatrix"
|
package/src/DOMAPI/Document.res
CHANGED
|
@@ -39,7 +39,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
39
39
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
|
|
40
40
|
*/
|
|
41
41
|
@send
|
|
42
|
-
external
|
|
42
|
+
external prependText: (document, string) => unit = "prepend"
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
|
|
@@ -57,7 +57,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
57
57
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/append)
|
|
58
58
|
*/
|
|
59
59
|
@send
|
|
60
|
-
external
|
|
60
|
+
external appendText: (document, string) => unit = "append"
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
|
|
@@ -75,7 +75,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
75
75
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
|
|
76
76
|
*/
|
|
77
77
|
@send
|
|
78
|
-
external
|
|
78
|
+
external replaceChildrenText: (document, string) => unit = "replaceChildren"
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
Returns the first element that is a descendant of node that matches selectors.
|
|
@@ -162,7 +162,7 @@ Creates an instance of the element for the specified tag.
|
|
|
162
162
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/createElement)
|
|
163
163
|
*/
|
|
164
164
|
@send
|
|
165
|
-
external
|
|
165
|
+
external createElementWithOptions: (
|
|
166
166
|
document,
|
|
167
167
|
~localName: string,
|
|
168
168
|
~options: elementCreationOptions=?,
|
|
@@ -209,7 +209,7 @@ When supplied, options's is can be used to create a customized built-in element.
|
|
|
209
209
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/createElementNS)
|
|
210
210
|
*/
|
|
211
211
|
@send
|
|
212
|
-
external
|
|
212
|
+
external createElementNSWithOptions: (
|
|
213
213
|
document,
|
|
214
214
|
~namespace: string,
|
|
215
215
|
~qualifiedName: string,
|
|
@@ -394,7 +394,7 @@ Opens a new window and loads a document specified by a given URL. Also, opens a
|
|
|
394
394
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/open)
|
|
395
395
|
*/
|
|
396
396
|
@send
|
|
397
|
-
external
|
|
397
|
+
external openWindow: (document, ~url: string, ~name: string, ~features: string) => window = "open"
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
400
|
Closes an output stream and forces the sent data to display.
|
|
@@ -31,7 +31,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
31
31
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/append)
|
|
32
32
|
*/
|
|
33
33
|
@send
|
|
34
|
-
external
|
|
34
|
+
external appendText: (T.t, string) => unit = "append"
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
Returns the first element within node's descendants whose ID is elementId.
|
|
@@ -56,7 +56,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
56
56
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/prepend)
|
|
57
57
|
*/
|
|
58
58
|
@send
|
|
59
|
-
external
|
|
59
|
+
external prependText: (T.t, string) => unit = "prepend"
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
Returns the first element that is a descendant of node that matches selectors.
|
|
@@ -88,7 +88,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
88
88
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/replaceChildren)
|
|
89
89
|
*/
|
|
90
90
|
@send
|
|
91
|
-
external
|
|
91
|
+
external replaceChildrenText: (T.t, string) => unit = "replaceChildren"
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
include Impl({type t = documentFragment})
|
package/src/DOMAPI/Element.res
CHANGED
|
@@ -26,7 +26,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
26
26
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/after)
|
|
27
27
|
*/
|
|
28
28
|
@send
|
|
29
|
-
external
|
|
29
|
+
external afterText: (T.t, string) => unit = "after"
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
|
|
@@ -38,8 +38,11 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
38
38
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
|
|
39
39
|
*/
|
|
40
40
|
@send
|
|
41
|
-
external
|
|
42
|
-
|
|
41
|
+
external animateWithOptions: (
|
|
42
|
+
T.t,
|
|
43
|
+
~keyframes: any,
|
|
44
|
+
~options: keyframeAnimationOptions=?,
|
|
45
|
+
) => animation = "animate"
|
|
43
46
|
|
|
44
47
|
/**
|
|
45
48
|
Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
|
|
@@ -57,7 +60,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
57
60
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/append)
|
|
58
61
|
*/
|
|
59
62
|
@send
|
|
60
|
-
external
|
|
63
|
+
external appendText: (T.t, string) => unit = "append"
|
|
61
64
|
|
|
62
65
|
/**
|
|
63
66
|
Creates a shadow root for element and returns it.
|
|
@@ -82,7 +85,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
82
85
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/before)
|
|
83
86
|
*/
|
|
84
87
|
@send
|
|
85
|
-
external
|
|
88
|
+
external beforeText: (T.t, string) => unit = "before"
|
|
86
89
|
|
|
87
90
|
/**
|
|
88
91
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility)
|
|
@@ -258,7 +261,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
258
261
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
|
|
259
262
|
*/
|
|
260
263
|
@send
|
|
261
|
-
external
|
|
264
|
+
external prependText: (T.t, string) => unit = "prepend"
|
|
262
265
|
|
|
263
266
|
/**
|
|
264
267
|
Returns the first element that is a descendant of node that matches selectors.
|
|
@@ -324,7 +327,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
324
327
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
|
|
325
328
|
*/
|
|
326
329
|
@send
|
|
327
|
-
external
|
|
330
|
+
external replaceChildrenText: (T.t, string) => unit = "replaceChildren"
|
|
328
331
|
|
|
329
332
|
/**
|
|
330
333
|
Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
|
|
@@ -342,7 +345,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
|
|
|
342
345
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceWith)
|
|
343
346
|
*/
|
|
344
347
|
@send
|
|
345
|
-
external
|
|
348
|
+
external replaceWithText: (T.t, string) => unit = "replaceWith"
|
|
346
349
|
|
|
347
350
|
/**
|
|
348
351
|
Displays element fullscreen and resolves promise when done.
|
|
@@ -371,7 +374,7 @@ When supplied, options's navigationUI member indicates whether showing navigatio
|
|
|
371
374
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scroll)
|
|
372
375
|
*/
|
|
373
376
|
@send
|
|
374
|
-
external
|
|
377
|
+
external scrollXY: (T.t, ~x: float, ~y: float) => unit = "scroll"
|
|
375
378
|
|
|
376
379
|
/**
|
|
377
380
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
|
|
@@ -383,7 +386,7 @@ When supplied, options's navigationUI member indicates whether showing navigatio
|
|
|
383
386
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
|
|
384
387
|
*/
|
|
385
388
|
@send
|
|
386
|
-
external
|
|
389
|
+
external scrollByXY: (T.t, ~x: float, ~y: float) => unit = "scrollBy"
|
|
387
390
|
|
|
388
391
|
/**
|
|
389
392
|
`scrollIntoView()`
|
|
@@ -437,7 +440,7 @@ element->Element.scrollIntoViewWithOptions({ behavior: DOMTypes.Smooth })
|
|
|
437
440
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
|
|
438
441
|
*/
|
|
439
442
|
@send
|
|
440
|
-
external
|
|
443
|
+
external scrollToXY: (T.t, ~x: float, ~y: float) => unit = "scrollTo"
|
|
441
444
|
|
|
442
445
|
/**
|
|
443
446
|
Sets the value of element's first attribute whose qualified name is qualifiedName to value.
|
|
@@ -56,7 +56,7 @@ external setRangeText: (htmlInputElement, string) => unit = "setRangeText"
|
|
|
56
56
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/setRangeText)
|
|
57
57
|
*/
|
|
58
58
|
@send
|
|
59
|
-
external
|
|
59
|
+
external setRangeTextWithRange: (
|
|
60
60
|
htmlInputElement,
|
|
61
61
|
~replacement: string,
|
|
62
62
|
~start: int,
|
|
@@ -40,7 +40,7 @@ Removes an element from the collection.
|
|
|
40
40
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/remove)
|
|
41
41
|
*/
|
|
42
42
|
@send
|
|
43
|
-
external
|
|
43
|
+
external removeByIndex: (htmlSelectElement, int) => unit = "remove"
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
Returns whether a form will validate when it is submitted, without having to submit it.
|
|
@@ -26,4 +26,4 @@ external assign: (htmlSlotElement, element) => unit = "assign"
|
|
|
26
26
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSlotElement/assign)
|
|
27
27
|
*/
|
|
28
28
|
@send
|
|
29
|
-
external
|
|
29
|
+
external assignText: (htmlSlotElement, text) => unit = "assign"
|
|
@@ -40,7 +40,7 @@ external setRangeText: (htmlTextAreaElement, string) => unit = "setRangeText"
|
|
|
40
40
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setRangeText)
|
|
41
41
|
*/
|
|
42
42
|
@send
|
|
43
|
-
external
|
|
43
|
+
external setRangeTextWithRange: (
|
|
44
44
|
htmlTextAreaElement,
|
|
45
45
|
~replacement: string,
|
|
46
46
|
~start: int,
|
package/src/DOMAPI/Navigator.res
CHANGED
|
@@ -39,37 +39,40 @@ external sendBeacon: (navigator, ~url: string, ~data: readableStream<unit>=?) =>
|
|
|
39
39
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
|
|
40
40
|
*/
|
|
41
41
|
@send
|
|
42
|
-
external
|
|
42
|
+
external sendBeaconWithBlob: (navigator, ~url: string, ~data: blob=?) => bool = "sendBeacon"
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
|
|
46
46
|
*/
|
|
47
47
|
@send
|
|
48
|
-
external
|
|
48
|
+
external sendBeaconWithDataView: (navigator, ~url: string, ~data: DataView.t=?) => bool =
|
|
49
|
+
"sendBeacon"
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
|
|
52
53
|
*/
|
|
53
54
|
@send
|
|
54
|
-
external
|
|
55
|
+
external sendBeaconWithArrayBuffer: (navigator, ~url: string, ~data: ArrayBuffer.t=?) => bool =
|
|
56
|
+
"sendBeacon"
|
|
55
57
|
|
|
56
58
|
/**
|
|
57
59
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
|
|
58
60
|
*/
|
|
59
61
|
@send
|
|
60
|
-
external
|
|
62
|
+
external sendBeaconWithFormData: (navigator, ~url: string, ~data: formData=?) => bool = "sendBeacon"
|
|
61
63
|
|
|
62
64
|
/**
|
|
63
65
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
|
|
64
66
|
*/
|
|
65
67
|
@send
|
|
66
|
-
external
|
|
68
|
+
external sendBeaconWithSearchParams: (navigator, ~url: string, ~data: urlSearchParams=?) => bool =
|
|
69
|
+
"sendBeacon"
|
|
67
70
|
|
|
68
71
|
/**
|
|
69
72
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon)
|
|
70
73
|
*/
|
|
71
74
|
@send
|
|
72
|
-
external
|
|
75
|
+
external sendBeaconWithString: (navigator, ~url: string, ~data: string=?) => bool = "sendBeacon"
|
|
73
76
|
|
|
74
77
|
/**
|
|
75
78
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/requestMediaKeySystemAccess)
|
|
@@ -97,7 +100,7 @@ external vibrate: (navigator, int) => bool = "vibrate"
|
|
|
97
100
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate)
|
|
98
101
|
*/
|
|
99
102
|
@send
|
|
100
|
-
external
|
|
103
|
+
external vibrateWithPattern: (navigator, array<int>) => bool = "vibrate"
|
|
101
104
|
|
|
102
105
|
/**
|
|
103
106
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/share)
|
|
@@ -23,7 +23,7 @@ external set: (stylePropertyMap, ~property: string, ~values: cssStyleValue) => u
|
|
|
23
23
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/set)
|
|
24
24
|
*/
|
|
25
25
|
@send
|
|
26
|
-
external
|
|
26
|
+
external setString: (stylePropertyMap, ~property: string, ~values: string) => unit = "set"
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/append)
|
|
@@ -35,7 +35,7 @@ external append: (stylePropertyMap, ~property: string, ~values: cssStyleValue) =
|
|
|
35
35
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/append)
|
|
36
36
|
*/
|
|
37
37
|
@send
|
|
38
|
-
external
|
|
38
|
+
external appendString: (stylePropertyMap, ~property: string, ~values: string) => unit = "append"
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/delete)
|