@rescript/webapi 0.1.0-pre-alpha-fd40382 → 0.1.0-pre-alpha-02fb350

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.
Files changed (66) hide show
  1. package/package.json +1 -1
  2. package/src/CSSFontLoadingAPI/FontFace.res +2 -2
  3. package/src/CanvasAPI/Path2D.res +1 -27
  4. package/src/ChannelMessagingAPI/MessagePort.res +1 -1
  5. package/src/DOMAPI/CanvasRenderingContext2D.res +32 -46
  6. package/src/DOMAPI/CharacterData.res +3 -3
  7. package/src/DOMAPI/DOMMatrix.res +1 -1
  8. package/src/DOMAPI/DOMMatrixReadOnly.res +1 -1
  9. package/src/DOMAPI/Document.res +8 -6
  10. package/src/DOMAPI/DocumentFragment.res +3 -3
  11. package/src/DOMAPI/Element.res +16 -11
  12. package/src/DOMAPI/HTMLCanvasElement.res +2 -0
  13. package/src/DOMAPI/HTMLElement.res +2 -0
  14. package/src/DOMAPI/HTMLImageElement.res +2 -0
  15. package/src/DOMAPI/HTMLInputElement.res +3 -1
  16. package/src/DOMAPI/HTMLSelectElement.res +1 -1
  17. package/src/DOMAPI/HTMLSlotElement.res +1 -1
  18. package/src/DOMAPI/HTMLTextAreaElement.res +1 -1
  19. package/src/DOMAPI/Location.res +2 -0
  20. package/src/DOMAPI/Navigator.res +10 -7
  21. package/src/DOMAPI/Node.res +2 -0
  22. package/src/DOMAPI/StylePropertyMap.res +2 -2
  23. package/src/DOMAPI/VideoFrame.res +20 -11
  24. package/src/DOMAPI/Window.res +29 -25
  25. package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +2 -2
  26. package/src/EncryptedMediaExtensionsAPI/MediaKeyStatusMap.res +1 -1
  27. package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +2 -1
  28. package/src/EventAPI/AbortController.res +2 -0
  29. package/src/EventAPI/AbortSignal.res +2 -0
  30. package/src/EventAPI/Event.res +2 -0
  31. package/src/EventAPI/EventTarget.res +2 -0
  32. package/src/EventAPI/ExtendableEvent.res +2 -0
  33. package/src/FileAPI/FileSystemWritableFileStream.res +4 -4
  34. package/src/FileAPI/ReadableStream.res +0 -12
  35. package/src/Global.res +23 -23
  36. package/src/IndexedDBAPI/IDBDatabase.res +1 -1
  37. package/src/IndexedDBAPI/IDBObjectStore.res +1 -1
  38. package/src/IntersectionObserverAPI/IntersectionObserver.res +2 -0
  39. package/src/IntersectionObserverAPI/IntersectionObserverRoot.res +2 -0
  40. package/src/MediaCaptureAndStreamsAPI/MediaStream.res +2 -2
  41. package/src/MutationObserverAPI/MutationObserver.res +2 -0
  42. package/src/PerformanceAPI/Performance.res +1 -1
  43. package/src/ResizeObserverAPI/ResizeObserver.res +2 -0
  44. package/src/ServiceWorkerAPI/Cache.res +10 -7
  45. package/src/ServiceWorkerAPI/ServiceWorker.res +1 -1
  46. package/src/UIEventsAPI/CompositionEvent.res +2 -0
  47. package/src/UIEventsAPI/DataTransfer.res +2 -0
  48. package/src/UIEventsAPI/DataTransferItem.res +2 -0
  49. package/src/UIEventsAPI/DataTransferItemList.res +2 -0
  50. package/src/UIEventsAPI/FocusEvent.res +2 -0
  51. package/src/UIEventsAPI/InputEvent.res +2 -0
  52. package/src/UIEventsAPI/KeyboardEvent.res +2 -0
  53. package/src/UIEventsAPI/MouseEvent.res +2 -0
  54. package/src/UIEventsAPI/PointerEvent.res +2 -0
  55. package/src/UIEventsAPI/Touch.res +2 -0
  56. package/src/UIEventsAPI/TouchEvent.res +2 -0
  57. package/src/UIEventsAPI/TouchList.res +2 -0
  58. package/src/UIEventsAPI/UIEvent.res +2 -0
  59. package/src/UIEventsAPI/WheelEvent.res +2 -0
  60. package/src/ViewTransitionsAPI/ViewTransition.res +2 -0
  61. package/src/WebAudioAPI/AudioNode.res +14 -8
  62. package/src/WebAudioAPI/OfflineAudioContext.res +5 -2
  63. package/src/WebCryptoAPI/SubtleCrypto.res +3 -3
  64. package/src/WebLocksAPI/LockManager.res +1 -1
  65. package/src/WebSocketsAPI/WebSocket.res +4 -4
  66. package/src/WebWorkersAPI/CacheStorage.res +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescript/webapi",
3
- "version": "0.1.0-pre-alpha-fd40382",
3
+ "version": "0.1.0-pre-alpha-02fb350",
4
4
  "description": "Experimental successor to [rescript-webapi](https://github.com/TheSpyder/rescript-webapi)",
5
5
  "keywords": [
6
6
  "dom",
@@ -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 make2: (
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 make3: (
24
+ external fromArrayBuffer: (
25
25
  ~family: string,
26
26
  ~source: ArrayBuffer.t,
27
27
  ~descriptors: fontFaceDescriptors=?,
@@ -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 make2: (~path: string=?) => path2D = "Path2D"
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 postMessage2: (
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 setTransform2: (canvasRenderingContext2D, ~transform: domMatrix2DInit=?) => unit =
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 createPattern2: (
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 createPattern3: (
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 createPattern4: (
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 createPattern5: (
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 createPattern6: (
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 createPattern7: (
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 fill2: (canvasRenderingContext2D, ~path: path2D, ~fillRule: canvasFillRule=?) => unit =
243
- "fill"
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 stroke2: (canvasRenderingContext2D, path2D) => unit = "stroke"
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 clip2: (canvasRenderingContext2D, ~path: path2D, ~fillRule: canvasFillRule=?) => unit =
268
- "clip"
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 isPointInPath2: (
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 isPointInStroke2: (canvasRenderingContext2D, ~path: path2D, ~x: float, ~y: float) => bool =
305
- "isPointInStroke"
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 drawFocusIfNeeded2: (canvasRenderingContext2D, ~path: path2D, ~element: element) => unit =
318
- "drawFocusIfNeeded"
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 createImageData2: (canvasRenderingContext2D, imageData) => imageData = "createImageData"
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 putImageData2: (
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 after2: (T.t, string) => unit = "after"
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 before2: (T.t, string) => unit = "before"
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 replaceWith2: (T.t, string) => unit = "replaceWith"
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)
@@ -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 make2: (~init: array<float>=?) => domMatrix = "DOMMatrix"
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 make2: (~init: array<float>=?) => domMatrixReadOnly = "DOMMatrixReadOnly"
14
+ external fromFloatArray: (~init: array<float>=?) => domMatrixReadOnly = "DOMMatrixReadOnly"
15
15
 
16
16
  @scope("DOMMatrixReadOnly")
17
17
  external fromMatrix: (~other: domMatrixInit=?) => domMatrixReadOnly = "fromMatrix"
@@ -2,6 +2,8 @@ open DOMTypes
2
2
  open EventTypes
3
3
  open ViewTransitionsTypes
4
4
 
5
+ type t = document = {...document}
6
+
5
7
  /**
6
8
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document)
7
9
  */
@@ -39,7 +41,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
39
41
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
40
42
  */
41
43
  @send
42
- external prepend2: (document, string) => unit = "prepend"
44
+ external prependText: (document, string) => unit = "prepend"
43
45
 
44
46
  /**
45
47
  Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
@@ -57,7 +59,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
57
59
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/append)
58
60
  */
59
61
  @send
60
- external append2: (document, string) => unit = "append"
62
+ external appendText: (document, string) => unit = "append"
61
63
 
62
64
  /**
63
65
  Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
@@ -75,7 +77,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
75
77
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
76
78
  */
77
79
  @send
78
- external replaceChildren2: (document, string) => unit = "replaceChildren"
80
+ external replaceChildrenText: (document, string) => unit = "replaceChildren"
79
81
 
80
82
  /**
81
83
  Returns the first element that is a descendant of node that matches selectors.
@@ -162,7 +164,7 @@ Creates an instance of the element for the specified tag.
162
164
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/createElement)
163
165
  */
164
166
  @send
165
- external createElement2: (
167
+ external createElementWithOptions: (
166
168
  document,
167
169
  ~localName: string,
168
170
  ~options: elementCreationOptions=?,
@@ -209,7 +211,7 @@ When supplied, options's is can be used to create a customized built-in element.
209
211
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/createElementNS)
210
212
  */
211
213
  @send
212
- external createElementNS2: (
214
+ external createElementNSWithOptions: (
213
215
  document,
214
216
  ~namespace: string,
215
217
  ~qualifiedName: string,
@@ -394,7 +396,7 @@ Opens a new window and loads a document specified by a given URL. Also, opens a
394
396
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/open)
395
397
  */
396
398
  @send
397
- external open2: (document, ~url: string, ~name: string, ~features: string) => window = "open"
399
+ external openWindow: (document, ~url: string, ~name: string, ~features: string) => window = "open"
398
400
 
399
401
  /**
400
402
  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 append2: (T.t, string) => unit = "append"
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 prepend2: (T.t, string) => unit = "prepend"
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 replaceChildren2: (T.t, string) => unit = "replaceChildren"
91
+ external replaceChildrenText: (T.t, string) => unit = "replaceChildren"
92
92
  }
93
93
 
94
94
  include Impl({type t = documentFragment})
@@ -1,6 +1,8 @@
1
1
  open DOMTypes
2
2
  open Prelude
3
3
 
4
+ type t = element = {...element}
5
+
4
6
  module Impl = (
5
7
  T: {
6
8
  type t
@@ -26,7 +28,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
26
28
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/after)
27
29
  */
28
30
  @send
29
- external after2: (T.t, string) => unit = "after"
31
+ external afterText: (T.t, string) => unit = "after"
30
32
 
31
33
  /**
32
34
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
@@ -38,8 +40,11 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
38
40
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
39
41
  */
40
42
  @send
41
- external animate2: (T.t, ~keyframes: any, ~options: keyframeAnimationOptions=?) => animation =
42
- "animate"
43
+ external animateWithOptions: (
44
+ T.t,
45
+ ~keyframes: any,
46
+ ~options: keyframeAnimationOptions=?,
47
+ ) => animation = "animate"
43
48
 
44
49
  /**
45
50
  Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
@@ -57,7 +62,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
57
62
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/append)
58
63
  */
59
64
  @send
60
- external append2: (T.t, string) => unit = "append"
65
+ external appendText: (T.t, string) => unit = "append"
61
66
 
62
67
  /**
63
68
  Creates a shadow root for element and returns it.
@@ -82,7 +87,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
82
87
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/before)
83
88
  */
84
89
  @send
85
- external before2: (T.t, string) => unit = "before"
90
+ external beforeText: (T.t, string) => unit = "before"
86
91
 
87
92
  /**
88
93
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility)
@@ -258,7 +263,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
258
263
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
259
264
  */
260
265
  @send
261
- external prepend2: (T.t, string) => unit = "prepend"
266
+ external prependText: (T.t, string) => unit = "prepend"
262
267
 
263
268
  /**
264
269
  Returns the first element that is a descendant of node that matches selectors.
@@ -324,7 +329,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
324
329
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
325
330
  */
326
331
  @send
327
- external replaceChildren2: (T.t, string) => unit = "replaceChildren"
332
+ external replaceChildrenText: (T.t, string) => unit = "replaceChildren"
328
333
 
329
334
  /**
330
335
  Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
@@ -342,7 +347,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
342
347
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceWith)
343
348
  */
344
349
  @send
345
- external replaceWith2: (T.t, string) => unit = "replaceWith"
350
+ external replaceWithText: (T.t, string) => unit = "replaceWith"
346
351
 
347
352
  /**
348
353
  Displays element fullscreen and resolves promise when done.
@@ -371,7 +376,7 @@ When supplied, options's navigationUI member indicates whether showing navigatio
371
376
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scroll)
372
377
  */
373
378
  @send
374
- external scroll2: (T.t, ~x: float, ~y: float) => unit = "scroll"
379
+ external scrollXY: (T.t, ~x: float, ~y: float) => unit = "scroll"
375
380
 
376
381
  /**
377
382
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
@@ -383,7 +388,7 @@ When supplied, options's navigationUI member indicates whether showing navigatio
383
388
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
384
389
  */
385
390
  @send
386
- external scrollBy2: (T.t, ~x: float, ~y: float) => unit = "scrollBy"
391
+ external scrollByXY: (T.t, ~x: float, ~y: float) => unit = "scrollBy"
387
392
 
388
393
  /**
389
394
  `scrollIntoView()`
@@ -437,7 +442,7 @@ element->Element.scrollIntoViewWithOptions({ behavior: DOMTypes.Smooth })
437
442
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
438
443
  */
439
444
  @send
440
- external scrollTo2: (T.t, ~x: float, ~y: float) => unit = "scrollTo"
445
+ external scrollToXY: (T.t, ~x: float, ~y: float) => unit = "scrollTo"
441
446
 
442
447
  /**
443
448
  Sets the value of element's first attribute whose qualified name is qualifiedName to value.
@@ -2,6 +2,8 @@ open DOMTypes
2
2
  open CanvasTypes
3
3
  open MediaCaptureAndStreamsTypes
4
4
 
5
+ type t = htmlCanvasElement = {...htmlCanvasElement}
6
+
5
7
  include HTMLElement.Impl({type t = htmlCanvasElement})
6
8
 
7
9
  /**
@@ -1,5 +1,7 @@
1
1
  open DOMTypes
2
2
 
3
+ type t = htmlElement = {...htmlElement}
4
+
3
5
  module Impl = (
4
6
  T: {
5
7
  type t
@@ -1,5 +1,7 @@
1
1
  open DOMTypes
2
2
 
3
+ type t = htmlImageElement = {...htmlImageElement}
4
+
3
5
  include HTMLElement.Impl({type t = htmlImageElement})
4
6
 
5
7
  /**
@@ -1,5 +1,7 @@
1
1
  open DOMTypes
2
2
 
3
+ type t = htmlInputElement = {...htmlInputElement}
4
+
3
5
  include HTMLElement.Impl({type t = htmlInputElement})
4
6
 
5
7
  /**
@@ -56,7 +58,7 @@ external setRangeText: (htmlInputElement, string) => unit = "setRangeText"
56
58
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/setRangeText)
57
59
  */
58
60
  @send
59
- external setRangeText2: (
61
+ external setRangeTextWithRange: (
60
62
  htmlInputElement,
61
63
  ~replacement: string,
62
64
  ~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 removeH2: (htmlSelectElement, int) => unit = "remove"
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 assign2: (htmlSlotElement, text) => unit = "assign"
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 setRangeText2: (
43
+ external setRangeTextWithRange: (
44
44
  htmlTextAreaElement,
45
45
  ~replacement: string,
46
46
  ~start: int,
@@ -1,5 +1,7 @@
1
1
  open DOMTypes
2
2
 
3
+ type t = location = {...location}
4
+
3
5
  /**
4
6
  Navigates to the given URL.
5
7
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Location/assign)
@@ -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 sendBeacon2: (navigator, ~url: string, ~data: blob=?) => bool = "sendBeacon"
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 sendBeacon3: (navigator, ~url: string, ~data: DataView.t=?) => bool = "sendBeacon"
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 sendBeacon4: (navigator, ~url: string, ~data: ArrayBuffer.t=?) => bool = "sendBeacon"
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 sendBeacon5: (navigator, ~url: string, ~data: formData=?) => bool = "sendBeacon"
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 sendBeacon6: (navigator, ~url: string, ~data: urlSearchParams=?) => bool = "sendBeacon"
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 sendBeacon7: (navigator, ~url: string, ~data: string=?) => bool = "sendBeacon"
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 vibrate2: (navigator, array<int>) => bool = "vibrate"
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)
@@ -1,5 +1,7 @@
1
1
  open DOMTypes
2
2
 
3
+ type t = node = {...node}
4
+
3
5
  module Impl = (
4
6
  T: {
5
7
  type t