@rescript/webapi 0.1.0-experimental-a0d5168 → 0.1.0-experimental-fb395c3

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