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