@rescript/webapi 0.1.0-experimental-a0d5168 → 0.1.0-experimental-47c6b2c

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 (133) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/CSSFontLoadingAPI/FontFaceSet.res +3 -79
  4. package/src/CanvasAPI/OffscreenCanvas.res +3 -79
  5. package/src/ChannelMessagingAPI/MessagePort.res +3 -81
  6. package/src/ClipboardAPI/Clipboard.res +3 -80
  7. package/src/DOMAPI/Animation.res +3 -80
  8. package/src/DOMAPI/CharacterData.res +68 -231
  9. package/src/DOMAPI/Comment.res +4 -271
  10. package/src/DOMAPI/Document.res +4 -178
  11. package/src/DOMAPI/DocumentFragment.res +58 -220
  12. package/src/DOMAPI/Element.res +313 -477
  13. package/src/DOMAPI/HTMLAnchorElement.res +3 -691
  14. package/src/DOMAPI/HTMLAreaElement.res +3 -685
  15. package/src/DOMAPI/HTMLAudioElement.res +3 -748
  16. package/src/DOMAPI/HTMLBRElement.res +3 -684
  17. package/src/DOMAPI/HTMLBaseElement.res +3 -685
  18. package/src/DOMAPI/HTMLBodyElement.res +3 -685
  19. package/src/DOMAPI/HTMLButtonElement.res +3 -691
  20. package/src/DOMAPI/HTMLCanvasElement.res +3 -691
  21. package/src/DOMAPI/HTMLDListElement.res +3 -688
  22. package/src/DOMAPI/HTMLDataElement.res +3 -685
  23. package/src/DOMAPI/HTMLDataListElement.res +3 -695
  24. package/src/DOMAPI/HTMLDialogElement.res +3 -691
  25. package/src/DOMAPI/HTMLDivElement.res +3 -684
  26. package/src/DOMAPI/HTMLElement.res +40 -666
  27. package/src/DOMAPI/HTMLEmbedElement.res +3 -688
  28. package/src/DOMAPI/HTMLFieldSetElement.res +3 -695
  29. package/src/DOMAPI/HTMLFormElement.res +3 -685
  30. package/src/DOMAPI/HTMLFrameSetElement.res +3 -695
  31. package/src/DOMAPI/HTMLHRElement.res +3 -684
  32. package/src/DOMAPI/HTMLHeadElement.res +3 -685
  33. package/src/DOMAPI/HTMLHeadingElement.res +3 -691
  34. package/src/DOMAPI/HTMLHtmlElement.res +3 -685
  35. package/src/DOMAPI/HTMLIFrameElement.res +3 -691
  36. package/src/DOMAPI/HTMLImageElement.res +3 -688
  37. package/src/DOMAPI/HTMLInputElement.res +3 -688
  38. package/src/DOMAPI/HTMLLIElement.res +3 -684
  39. package/src/DOMAPI/HTMLLabelElement.res +3 -688
  40. package/src/DOMAPI/HTMLLegendElement.res +3 -691
  41. package/src/DOMAPI/HTMLLinkElement.res +3 -685
  42. package/src/DOMAPI/HTMLMapElement.res +3 -684
  43. package/src/DOMAPI/HTMLMediaElement.res +49 -722
  44. package/src/DOMAPI/HTMLMenuElement.res +3 -685
  45. package/src/DOMAPI/HTMLMetaElement.res +3 -685
  46. package/src/DOMAPI/HTMLMeterElement.res +3 -688
  47. package/src/DOMAPI/HTMLModElement.res +3 -684
  48. package/src/DOMAPI/HTMLOListElement.res +3 -688
  49. package/src/DOMAPI/HTMLObjectElement.res +3 -691
  50. package/src/DOMAPI/HTMLOptGroupElement.res +3 -695
  51. package/src/DOMAPI/HTMLOptionElement.res +3 -691
  52. package/src/DOMAPI/HTMLOutputElement.res +3 -691
  53. package/src/DOMAPI/HTMLParagraphElement.res +3 -699
  54. package/src/DOMAPI/HTMLPictureElement.res +3 -691
  55. package/src/DOMAPI/HTMLPreElement.res +3 -684
  56. package/src/DOMAPI/HTMLProgressElement.res +3 -695
  57. package/src/DOMAPI/HTMLQuoteElement.res +3 -688
  58. package/src/DOMAPI/HTMLScriptElement.res +3 -691
  59. package/src/DOMAPI/HTMLSelectElement.res +4 -692
  60. package/src/DOMAPI/HTMLSlotElement.res +3 -685
  61. package/src/DOMAPI/HTMLSourceElement.res +3 -691
  62. package/src/DOMAPI/HTMLSpanElement.res +3 -685
  63. package/src/DOMAPI/HTMLStyleElement.res +3 -688
  64. package/src/DOMAPI/HTMLTableCaptionElement.res +3 -712
  65. package/src/DOMAPI/HTMLTableCellElement.res +3 -699
  66. package/src/DOMAPI/HTMLTableElement.res +3 -688
  67. package/src/DOMAPI/HTMLTableRowElement.res +3 -695
  68. package/src/DOMAPI/HTMLTableSectionElement.res +3 -712
  69. package/src/DOMAPI/HTMLTemplateElement.res +3 -695
  70. package/src/DOMAPI/HTMLTextAreaElement.res +3 -695
  71. package/src/DOMAPI/HTMLTimeElement.res +3 -685
  72. package/src/DOMAPI/HTMLTitleElement.res +3 -688
  73. package/src/DOMAPI/HTMLTrackElement.res +3 -688
  74. package/src/DOMAPI/HTMLUListElement.res +3 -688
  75. package/src/DOMAPI/HTMLVideoElement.res +3 -748
  76. package/src/DOMAPI/MediaQueryList.res +3 -80
  77. package/src/DOMAPI/Node.res +59 -124
  78. package/src/DOMAPI/SVGGraphicsElement.res +4 -660
  79. package/src/DOMAPI/ScreenOrientation.res +3 -79
  80. package/src/DOMAPI/ShadowRoot.res +4 -255
  81. package/src/DOMAPI/Text.res +4 -271
  82. package/src/DOMAPI/TextTrackList.res +3 -79
  83. package/src/DOMAPI/Window.res +4 -80
  84. package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +3 -80
  85. package/src/EventAPI/AbortSignal.res +3 -80
  86. package/src/EventAPI/Event.res +28 -16
  87. package/src/EventAPI/EventTarget.res +51 -39
  88. package/src/FileAPI/Blob.res +26 -15
  89. package/src/FileAPI/File.res +4 -31
  90. package/src/IndexedDBAPI/IDBDatabase.res +3 -79
  91. package/src/IndexedDBAPI/IDBTransaction.res +3 -80
  92. package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +3 -79
  93. package/src/MediaCaptureAndStreamsAPI/MediaStream.res +3 -80
  94. package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +3 -81
  95. package/src/NotificationAPI/Notification.res +3 -80
  96. package/src/PerformanceAPI/Performance.res +3 -79
  97. package/src/RemotePlaybackAPI/RemotePlayback.res +3 -80
  98. package/src/ScreenWakeLockAPI/WakeLockSentinel.res +3 -79
  99. package/src/ServiceWorkerAPI/ServiceWorker.res +3 -79
  100. package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +3 -79
  101. package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +3 -79
  102. package/src/WebAudioAPI/AnalyserNode.res +4 -148
  103. package/src/WebAudioAPI/AudioBufferSourceNode.res +4 -162
  104. package/src/WebAudioAPI/AudioContext.res +4 -212
  105. package/src/WebAudioAPI/AudioNode.res +39 -113
  106. package/src/WebAudioAPI/AudioProcessingEvent.res +4 -30
  107. package/src/WebAudioAPI/AudioScheduledSourceNode.res +20 -162
  108. package/src/WebAudioAPI/AudioWorkletNode.res +4 -149
  109. package/src/WebAudioAPI/BaseAudioContext.res +85 -155
  110. package/src/WebAudioAPI/BiquadFilterNode.res +4 -149
  111. package/src/WebAudioAPI/ChannelMergerNode.res +4 -149
  112. package/src/WebAudioAPI/ChannelSplitterNode.res +4 -149
  113. package/src/WebAudioAPI/ConstantSourceNode.res +4 -162
  114. package/src/WebAudioAPI/ConvolverNode.res +4 -149
  115. package/src/WebAudioAPI/DelayNode.res +4 -143
  116. package/src/WebAudioAPI/DynamicsCompressorNode.res +4 -152
  117. package/src/WebAudioAPI/GainNode.res +4 -142
  118. package/src/WebAudioAPI/IIRFilterNode.res +4 -149
  119. package/src/WebAudioAPI/MediaElementAudioSourceNode.res +4 -158
  120. package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +4 -158
  121. package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +4 -158
  122. package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +4 -30
  123. package/src/WebAudioAPI/OfflineAudioContext.res +4 -214
  124. package/src/WebAudioAPI/OscillatorNode.res +4 -162
  125. package/src/WebAudioAPI/PannerNode.res +4 -143
  126. package/src/WebAudioAPI/StereoPannerNode.res +4 -149
  127. package/src/WebAudioAPI/WaveShaperNode.res +4 -149
  128. package/src/WebSocketsAPI/CloseEvent.res +4 -30
  129. package/src/WebSocketsAPI/WebSocket.res +3 -79
  130. package/src/WebSpeechAPI/SpeechSynthesis.res +3 -79
  131. package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +4 -81
  132. package/src/WebStorageAPI/StorageEvent.res +4 -30
  133. package/src/WebVTTAPI/TextTrack.res +3 -79
@@ -1,697 +1,5 @@
1
1
  open DOMAPI
2
- open Prelude
3
- open EventAPI
4
2
 
5
- external asHTMLElement: htmlOptGroupElement => htmlElement = "%identity"
6
- external asElement: htmlOptGroupElement => element = "%identity"
7
- external asNode: htmlOptGroupElement => node = "%identity"
8
- external asEventTarget: htmlOptGroupElement => eventTarget = "%identity"
9
- /**
10
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/focus)
11
- */
12
- @send
13
- external focus: (htmlOptGroupElement, ~options: focusOptions=?) => unit = "focus"
14
-
15
- /**
16
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/blur)
17
- */
18
- @send
19
- external blur: htmlOptGroupElement => unit = "blur"
20
-
21
- /**
22
- Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
23
-
24
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
25
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
26
- */
27
- @send
28
- external prepend: (htmlOptGroupElement, node) => unit = "prepend"
29
-
30
- /**
31
- Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
32
-
33
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
34
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
35
- */
36
- @send
37
- external prepend2: (htmlOptGroupElement, string) => unit = "prepend"
38
-
39
- /**
40
- Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
41
-
42
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
43
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/append)
44
- */
45
- @send
46
- external append: (htmlOptGroupElement, node) => unit = "append"
47
-
48
- /**
49
- Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
50
-
51
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
52
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/append)
53
- */
54
- @send
55
- external append2: (htmlOptGroupElement, string) => unit = "append"
56
-
57
- /**
58
- Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
59
-
60
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
61
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
62
- */
63
- @send
64
- external replaceChildren: (htmlOptGroupElement, node) => unit = "replaceChildren"
65
-
66
- /**
67
- Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
68
-
69
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
70
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
71
- */
72
- @send
73
- external replaceChildren2: (htmlOptGroupElement, string) => unit = "replaceChildren"
74
-
75
- /**
76
- Returns the first element that is a descendant of node that matches selectors.
77
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
78
- */
79
- @send
80
- external querySelector: (htmlOptGroupElement, string) => element = "querySelector"
81
-
82
- /**
83
- Returns all element descendants of node that match selectors.
84
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/querySelectorAll)
85
- */
86
- @send
87
- external querySelectorAll: (htmlOptGroupElement, string) => nodeList = "querySelectorAll"
88
-
89
- /**
90
- Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
91
-
92
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
93
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/before)
94
- */
95
- @send
96
- external before: (htmlOptGroupElement, node) => unit = "before"
97
-
98
- /**
99
- Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
100
-
101
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
102
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/before)
103
- */
104
- @send
105
- external before2: (htmlOptGroupElement, string) => unit = "before"
106
-
107
- /**
108
- Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.
109
-
110
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
111
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/after)
112
- */
113
- @send
114
- external after: (htmlOptGroupElement, node) => unit = "after"
115
-
116
- /**
117
- Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.
118
-
119
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
120
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/after)
121
- */
122
- @send
123
- external after2: (htmlOptGroupElement, string) => unit = "after"
124
-
125
- /**
126
- Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
127
-
128
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
129
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceWith)
130
- */
131
- @send
132
- external replaceWith: (htmlOptGroupElement, node) => unit = "replaceWith"
133
-
134
- /**
135
- Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
136
-
137
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
138
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceWith)
139
- */
140
- @send
141
- external replaceWith2: (htmlOptGroupElement, string) => unit = "replaceWith"
142
-
143
- /**
144
- Removes node.
145
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/remove)
146
- */
147
- @send
148
- external remove: htmlOptGroupElement => unit = "remove"
149
-
150
- /**
151
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
152
- */
153
- @send
154
- external animate: (htmlOptGroupElement, ~keyframes: any, ~options: float=?) => animation = "animate"
155
-
156
- /**
157
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
158
- */
159
- @send
160
- external animate2: (
161
- htmlOptGroupElement,
162
- ~keyframes: any,
163
- ~options: keyframeAnimationOptions=?,
164
- ) => animation = "animate"
165
-
166
- /**
167
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAnimations)
168
- */
169
- @send
170
- external getAnimations: (
171
- htmlOptGroupElement,
172
- ~options: getAnimationsOptions=?,
173
- ) => array<animation> = "getAnimations"
174
-
175
- /**
176
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
177
-
178
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
179
-
180
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
181
-
182
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
183
-
184
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
185
-
186
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
187
-
188
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
189
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
190
- */
191
- @send
192
- external addEventListener: (
193
- htmlOptGroupElement,
194
- ~type_: eventType,
195
- ~callback: eventListener<'event>,
196
- ~options: addEventListenerOptions=?,
197
- ) => unit = "addEventListener"
198
-
199
- /**
200
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
201
-
202
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
203
-
204
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
205
-
206
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
207
-
208
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
209
-
210
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
211
-
212
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
213
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
214
- */
215
- @send
216
- external addEventListener2: (
217
- htmlOptGroupElement,
218
- ~type_: eventType,
219
- ~callback: eventListener<'event>,
220
- ~options: bool=?,
221
- ) => unit = "addEventListener"
222
-
223
- /**
224
- Removes the event listener in target's event listener list with the same type, callback, and options.
225
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
226
- */
227
- @send
228
- external removeEventListener: (
229
- htmlOptGroupElement,
230
- ~type_: eventType,
231
- ~callback: eventListener<'event>,
232
- ~options: eventListenerOptions=?,
233
- ) => unit = "removeEventListener"
234
-
235
- /**
236
- Removes the event listener in target's event listener list with the same type, callback, and options.
237
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
238
- */
239
- @send
240
- external removeEventListener2: (
241
- htmlOptGroupElement,
242
- ~type_: eventType,
243
- ~callback: eventListener<'event>,
244
- ~options: bool=?,
245
- ) => unit = "removeEventListener"
246
-
247
- /**
248
- Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
249
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
250
- */
251
- @send
252
- external dispatchEvent: (htmlOptGroupElement, event) => bool = "dispatchEvent"
253
-
254
- /**
255
- Returns node's root.
256
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/getRootNode)
257
- */
258
- @send
259
- external getRootNode: (htmlOptGroupElement, ~options: getRootNodeOptions=?) => node = "getRootNode"
260
-
261
- /**
262
- Returns whether node has children.
263
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
264
- */
265
- @send
266
- external hasChildNodes: htmlOptGroupElement => bool = "hasChildNodes"
267
-
268
- /**
269
- Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
270
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/normalize)
271
- */
272
- @send
273
- external normalize: htmlOptGroupElement => unit = "normalize"
274
-
275
- /**
276
- Returns a copy of node. If deep is true, the copy also includes the node's descendants.
277
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
278
- */
279
- @send
280
- external cloneNode: (htmlOptGroupElement, ~deep: bool=?) => node = "cloneNode"
281
-
282
- /**
283
- Returns whether node and otherNode have the same properties.
284
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isEqualNode)
285
- */
286
- @send
287
- external isEqualNode: (htmlOptGroupElement, node) => bool = "isEqualNode"
288
-
289
- /**
290
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isSameNode)
291
- */
292
- @send
293
- external isSameNode: (htmlOptGroupElement, node) => bool = "isSameNode"
294
-
295
- /**
296
- Returns a bitmask indicating the position of other relative to node.
297
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/compareDocumentPosition)
298
- */
299
- @send
300
- external compareDocumentPosition: (htmlOptGroupElement, node) => int = "compareDocumentPosition"
301
-
302
- /**
303
- Returns true if other is an inclusive descendant of node, and false otherwise.
304
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/contains)
305
- */
306
- @send
307
- external contains: (htmlOptGroupElement, node) => bool = "contains"
308
-
309
- /**
310
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
311
- */
312
- @send
313
- external lookupPrefix: (htmlOptGroupElement, string) => string = "lookupPrefix"
314
-
315
- /**
316
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
317
- */
318
- @send
319
- external lookupNamespaceURI: (htmlOptGroupElement, string) => string = "lookupNamespaceURI"
320
-
321
- /**
322
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
323
- */
324
- @send
325
- external isDefaultNamespace: (htmlOptGroupElement, string) => bool = "isDefaultNamespace"
326
-
327
- /**
328
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
329
- */
330
- @send
331
- external insertBefore: (htmlOptGroupElement, 't, ~child: node) => 't = "insertBefore"
332
-
333
- /**
334
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
335
- */
336
- @send
337
- external appendChild: (htmlOptGroupElement, 't) => 't = "appendChild"
338
-
339
- /**
340
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
341
- */
342
- @send
343
- external replaceChild: (htmlOptGroupElement, ~node: node, 't) => 't = "replaceChild"
344
-
345
- /**
346
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
347
- */
348
- @send
349
- external removeChild: (htmlOptGroupElement, 't) => 't = "removeChild"
350
-
351
- /**
352
- Returns true if element has attributes, and false otherwise.
353
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttributes)
354
- */
355
- @send
356
- external hasAttributes: htmlOptGroupElement => bool = "hasAttributes"
357
-
358
- /**
359
- Returns the qualified names of all element's attributes. Can contain duplicates.
360
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNames)
361
- */
362
- @send
363
- external getAttributeNames: htmlOptGroupElement => array<string> = "getAttributeNames"
364
-
365
- /**
366
- Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
367
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttribute)
368
- */
369
- @send
370
- external getAttribute: (htmlOptGroupElement, string) => string = "getAttribute"
371
-
372
- /**
373
- Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.
374
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNS)
375
- */
376
- @send
377
- external getAttributeNS: (htmlOptGroupElement, ~namespace: string, ~localName: string) => string =
378
- "getAttributeNS"
379
-
380
- /**
381
- Sets the value of element's first attribute whose qualified name is qualifiedName to value.
382
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttribute)
383
- */
384
- @send
385
- external setAttribute: (htmlOptGroupElement, ~qualifiedName: string, ~value: string) => unit =
386
- "setAttribute"
387
-
388
- /**
389
- Sets the value of element's attribute whose namespace is namespace and local name is localName to value.
390
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNS)
391
- */
392
- @send
393
- external setAttributeNS: (
394
- htmlOptGroupElement,
395
- ~namespace: string,
396
- ~qualifiedName: string,
397
- ~value: string,
398
- ) => unit = "setAttributeNS"
399
-
400
- /**
401
- Removes element's first attribute whose qualified name is qualifiedName.
402
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute)
403
- */
404
- @send
405
- external removeAttribute: (htmlOptGroupElement, string) => unit = "removeAttribute"
406
-
407
- /**
408
- Removes element's attribute whose namespace is namespace and local name is localName.
409
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNS)
410
- */
411
- @send
412
- external removeAttributeNS: (htmlOptGroupElement, ~namespace: string, ~localName: string) => unit =
413
- "removeAttributeNS"
414
-
415
- /**
416
- If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.
417
-
418
- Returns true if qualifiedName is now present, and false otherwise.
419
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/toggleAttribute)
420
- */
421
- @send
422
- external toggleAttribute: (htmlOptGroupElement, ~qualifiedName: string, ~force: bool=?) => bool =
423
- "toggleAttribute"
424
-
425
- /**
426
- Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
427
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttribute)
428
- */
429
- @send
430
- external hasAttribute: (htmlOptGroupElement, string) => bool = "hasAttribute"
431
-
432
- /**
433
- Returns true if element has an attribute whose namespace is namespace and local name is localName.
434
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttributeNS)
435
- */
436
- @send
437
- external hasAttributeNS: (htmlOptGroupElement, ~namespace: string, ~localName: string) => bool =
438
- "hasAttributeNS"
439
-
440
- /**
441
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNode)
442
- */
443
- @send
444
- external getAttributeNode: (htmlOptGroupElement, string) => attr = "getAttributeNode"
445
-
446
- /**
447
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNodeNS)
448
- */
449
- @send
450
- external getAttributeNodeNS: (htmlOptGroupElement, ~namespace: string, ~localName: string) => attr =
451
- "getAttributeNodeNS"
452
-
453
- /**
454
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNode)
455
- */
456
- @send
457
- external setAttributeNode: (htmlOptGroupElement, attr) => attr = "setAttributeNode"
458
-
459
- /**
460
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
461
- */
462
- @send
463
- external setAttributeNodeNS: (htmlOptGroupElement, attr) => attr = "setAttributeNodeNS"
464
-
465
- /**
466
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNode)
467
- */
468
- @send
469
- external removeAttributeNode: (htmlOptGroupElement, attr) => attr = "removeAttributeNode"
470
-
471
- /**
472
- Creates a shadow root for element and returns it.
473
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attachShadow)
474
- */
475
- @send
476
- external attachShadow: (htmlOptGroupElement, shadowRootInit) => shadowRoot = "attachShadow"
477
-
478
- /**
479
- Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
480
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/closest)
481
- */
482
- @send
483
- external closest: (htmlOptGroupElement, string) => 'e = "closest"
484
-
485
- /**
486
- Returns true if matching selectors against element's root yields element, and false otherwise.
487
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/matches)
488
- */
489
- @send
490
- external matches: (htmlOptGroupElement, string) => bool = "matches"
491
-
492
- /**
493
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagName)
494
- */
495
- @send
496
- external getElementsByTagName: (htmlOptGroupElement, string) => htmlCollection =
497
- "getElementsByTagName"
498
-
499
- /**
500
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagNameNS)
501
- */
502
- @send
503
- external getElementsByTagNameNS: (
504
- htmlOptGroupElement,
505
- ~namespace: string,
506
- ~localName: string,
507
- ) => htmlCollectionOf<element> = "getElementsByTagNameNS"
508
-
509
- /**
510
- Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
511
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByClassName)
512
- */
513
- @send
514
- external getElementsByClassName: (htmlOptGroupElement, string) => htmlCollectionOf<element> =
515
- "getElementsByClassName"
516
-
517
- /**
518
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentElement)
519
- */
520
- @send
521
- external insertAdjacentElement: (
522
- htmlOptGroupElement,
523
- ~where: insertPosition,
524
- ~element: element,
525
- ) => element = "insertAdjacentElement"
526
-
527
- /**
528
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentText)
529
- */
530
- @send
531
- external insertAdjacentText: (htmlOptGroupElement, ~where: insertPosition, ~data: string) => unit =
532
- "insertAdjacentText"
533
-
534
- /**
535
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/computedStyleMap)
536
- */
537
- @send
538
- external computedStyleMap: htmlOptGroupElement => stylePropertyMapReadOnly = "computedStyleMap"
539
-
540
- /**
541
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getClientRects)
542
- */
543
- @send
544
- external getClientRects: htmlOptGroupElement => domRectList = "getClientRects"
545
-
546
- /**
547
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getBoundingClientRect)
548
- */
549
- @send
550
- external getBoundingClientRect: htmlOptGroupElement => domRect = "getBoundingClientRect"
551
-
552
- /**
553
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility)
554
- */
555
- @send
556
- external checkVisibility: (htmlOptGroupElement, ~options: checkVisibilityOptions=?) => bool =
557
- "checkVisibility"
558
-
559
- /**
560
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)
561
- */
562
- @send
563
- external scrollIntoView: (htmlOptGroupElement, ~arg: bool=?) => unit = "scrollIntoView"
564
-
565
- /**
566
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)
567
- */
568
- @send
569
- external scrollIntoView2: (htmlOptGroupElement, ~arg: scrollIntoViewOptions=?) => unit =
570
- "scrollIntoView"
571
-
572
- /**
573
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scroll)
574
- */
575
- @send
576
- external scroll: (htmlOptGroupElement, ~options: scrollToOptions=?) => unit = "scroll"
577
-
578
- /**
579
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scroll)
580
- */
581
- @send
582
- external scroll2: (htmlOptGroupElement, ~x: float, ~y: float) => unit = "scroll"
583
-
584
- /**
585
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
586
- */
587
- @send
588
- external scrollTo: (htmlOptGroupElement, ~options: scrollToOptions=?) => unit = "scrollTo"
589
-
590
- /**
591
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
592
- */
593
- @send
594
- external scrollTo2: (htmlOptGroupElement, ~x: float, ~y: float) => unit = "scrollTo"
595
-
596
- /**
597
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
598
- */
599
- @send
600
- external scrollBy: (htmlOptGroupElement, ~options: scrollToOptions=?) => unit = "scrollBy"
601
-
602
- /**
603
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
604
- */
605
- @send
606
- external scrollBy2: (htmlOptGroupElement, ~x: float, ~y: float) => unit = "scrollBy"
607
-
608
- /**
609
- Displays element fullscreen and resolves promise when done.
610
-
611
- When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.
612
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestFullscreen)
613
- */
614
- @send
615
- external requestFullscreen: (
616
- htmlOptGroupElement,
617
- ~options: fullscreenOptions=?,
618
- ) => Promise.t<unit> = "requestFullscreen"
619
-
620
- /**
621
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setHTMLUnsafe)
622
- */
623
- @send
624
- external setHTMLUnsafe: (htmlOptGroupElement, string) => unit = "setHTMLUnsafe"
625
-
626
- /**
627
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getHTML)
628
- */
629
- @send
630
- external getHTML: (htmlOptGroupElement, ~options: getHTMLOptions=?) => string = "getHTML"
631
-
632
- /**
633
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentHTML)
634
- */
635
- @send
636
- external insertAdjacentHTML: (
637
- htmlOptGroupElement,
638
- ~position: insertPosition,
639
- ~string: string,
640
- ) => unit = "insertAdjacentHTML"
641
-
642
- /**
643
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture)
644
- */
645
- @send
646
- external setPointerCapture: (htmlOptGroupElement, int) => unit = "setPointerCapture"
647
-
648
- /**
649
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture)
650
- */
651
- @send
652
- external releasePointerCapture: (htmlOptGroupElement, int) => unit = "releasePointerCapture"
653
-
654
- /**
655
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasPointerCapture)
656
- */
657
- @send
658
- external hasPointerCapture: (htmlOptGroupElement, int) => bool = "hasPointerCapture"
659
-
660
- /**
661
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestPointerLock)
662
- */
663
- @send
664
- external requestPointerLock: (
665
- htmlOptGroupElement,
666
- ~options: pointerLockOptions=?,
667
- ) => Promise.t<unit> = "requestPointerLock"
668
-
669
- /**
670
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/click)
671
- */
672
- @send
673
- external click: htmlOptGroupElement => unit = "click"
674
-
675
- /**
676
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attachInternals)
677
- */
678
- @send
679
- external attachInternals: htmlOptGroupElement => elementInternals = "attachInternals"
680
-
681
- /**
682
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover)
683
- */
684
- @send
685
- external showPopover: htmlOptGroupElement => unit = "showPopover"
686
-
687
- /**
688
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidePopover)
689
- */
690
- @send
691
- external hidePopover: htmlOptGroupElement => unit = "hidePopover"
692
-
693
- /**
694
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
695
- */
696
- @send
697
- external togglePopover: (htmlOptGroupElement, ~force: bool=?) => bool = "togglePopover"
3
+ include HTMLElement.Impl({
4
+ type t = htmlOptGroupElement
5
+ })