@rescript/webapi 0.1.0-experimental-e9e0d90 → 0.1.0-experimental-3cb774d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/DOMAPI/Document.res +8 -7
- package/src/DOMAPI/DocumentFragment.res +2 -2
- package/src/DOMAPI/Element.res +4 -4
- package/src/DOMAPI/HTMLCollection.res +2 -2
- package/src/DOMAPI/HTMLFormControlsCollection.res +1 -1
- package/src/DOMAPI/NodeList.res +1 -1
- package/src/DOMAPI/Window.res +1 -1
- package/src/DOMAPI.res +47 -67
- package/src/Global.res +1 -1
- package/src/DOMAPI/HTMLCollectionOf.res +0 -16
- package/src/DOMAPI/NodeListOf.res +0 -9
package/package.json
CHANGED
package/src/DOMAPI/Document.res
CHANGED
|
@@ -15,7 +15,7 @@ Returns the first element within node's descendants whose ID is elementId.
|
|
|
15
15
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getElementById)
|
|
16
16
|
*/
|
|
17
17
|
@send
|
|
18
|
-
external getElementById: (document, string) => element = "getElementById"
|
|
18
|
+
external getElementById: (document, string) => null<element> = "getElementById"
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getAnimations)
|
|
@@ -89,7 +89,7 @@ Returns all element descendants of node that match selectors.
|
|
|
89
89
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/querySelectorAll)
|
|
90
90
|
*/
|
|
91
91
|
@send
|
|
92
|
-
external querySelectorAll: (document, string) => nodeList = "querySelectorAll"
|
|
92
|
+
external querySelectorAll: (document, string) => nodeList<element> = "querySelectorAll"
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/createExpression)
|
|
@@ -120,7 +120,8 @@ Retrieves a collection of objects based on the specified element name.
|
|
|
120
120
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getElementsByTagName)
|
|
121
121
|
*/
|
|
122
122
|
@send
|
|
123
|
-
external getElementsByTagName: (document, string) => htmlCollection =
|
|
123
|
+
external getElementsByTagName: (document, string) => htmlCollection<element> =
|
|
124
|
+
"getElementsByTagName"
|
|
124
125
|
|
|
125
126
|
/**
|
|
126
127
|
If namespace and localName are "*" returns a HTMLCollection of all descendant elements.
|
|
@@ -137,14 +138,14 @@ external getElementsByTagNameNS: (
|
|
|
137
138
|
document,
|
|
138
139
|
~namespace: string,
|
|
139
140
|
~localName: string,
|
|
140
|
-
) =>
|
|
141
|
+
) => htmlCollection<element> = "getElementsByTagNameNS"
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
144
|
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.
|
|
144
145
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getElementsByClassName)
|
|
145
146
|
*/
|
|
146
147
|
@send
|
|
147
|
-
external getElementsByClassName: (document, string) =>
|
|
148
|
+
external getElementsByClassName: (document, string) => htmlCollection<element> =
|
|
148
149
|
"getElementsByClassName"
|
|
149
150
|
|
|
150
151
|
/**
|
|
@@ -371,7 +372,7 @@ Gets a collection of objects based on the value of the NAME or ID attribute.
|
|
|
371
372
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getElementsByName)
|
|
372
373
|
*/
|
|
373
374
|
@send
|
|
374
|
-
external getElementsByName: (document, string) =>
|
|
375
|
+
external getElementsByName: (document, string) => nodeList<htmlElement> = "getElementsByName"
|
|
375
376
|
|
|
376
377
|
/**
|
|
377
378
|
Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
|
|
@@ -442,7 +443,7 @@ Returns an object representing the current selection of the document that is loa
|
|
|
442
443
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getSelection)
|
|
443
444
|
*/
|
|
444
445
|
@send
|
|
445
|
-
external getSelection: document => selection = "getSelection"
|
|
446
|
+
external getSelection: document => null<selection> = "getSelection"
|
|
446
447
|
|
|
447
448
|
/**
|
|
448
449
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/hasStorageAccess)
|
|
@@ -38,7 +38,7 @@ Returns the first element within node's descendants whose ID is elementId.
|
|
|
38
38
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/getElementById)
|
|
39
39
|
*/
|
|
40
40
|
@send
|
|
41
|
-
external getElementById: (T.t, string) => element = "getElementById"
|
|
41
|
+
external getElementById: (T.t, string) => null<element> = "getElementById"
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
|
|
@@ -70,7 +70,7 @@ Returns all element descendants of node that match selectors.
|
|
|
70
70
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/querySelectorAll)
|
|
71
71
|
*/
|
|
72
72
|
@send
|
|
73
|
-
external querySelectorAll: (T.t, string) => nodeList = "querySelectorAll"
|
|
73
|
+
external querySelectorAll: (T.t, string) => nodeList<element> = "querySelectorAll"
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
|
package/src/DOMAPI/Element.res
CHANGED
|
@@ -162,14 +162,14 @@ Returns a HTMLCollection of the elements in the object on which the method was i
|
|
|
162
162
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByClassName)
|
|
163
163
|
*/
|
|
164
164
|
@send
|
|
165
|
-
external getElementsByClassName: (T.t, string) =>
|
|
165
|
+
external getElementsByClassName: (T.t, string) => htmlCollection<element> =
|
|
166
166
|
"getElementsByClassName"
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagName)
|
|
170
170
|
*/
|
|
171
171
|
@send
|
|
172
|
-
external getElementsByTagName: (T.t, string) => htmlCollection = "getElementsByTagName"
|
|
172
|
+
external getElementsByTagName: (T.t, string) => htmlCollection<element> = "getElementsByTagName"
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
175
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagNameNS)
|
|
@@ -179,7 +179,7 @@ Returns a HTMLCollection of the elements in the object on which the method was i
|
|
|
179
179
|
element,
|
|
180
180
|
~namespace: string,
|
|
181
181
|
~localName: string,
|
|
182
|
-
) =>
|
|
182
|
+
) => htmlCollection<element> = "getElementsByTagNameNS"
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
185
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getHTML)
|
|
@@ -272,7 +272,7 @@ Returns all element descendants of node that match selectors.
|
|
|
272
272
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/querySelectorAll)
|
|
273
273
|
*/
|
|
274
274
|
@send
|
|
275
|
-
external querySelectorAll: (T.t, string) => nodeList = "querySelectorAll"
|
|
275
|
+
external querySelectorAll: (T.t, string) => nodeList<element> = "querySelectorAll"
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
278
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture)
|
|
@@ -5,11 +5,11 @@ Retrieves an object from various collections.
|
|
|
5
5
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/item)
|
|
6
6
|
*/
|
|
7
7
|
@send
|
|
8
|
-
external item: (htmlCollection
|
|
8
|
+
external item: (htmlCollection<'t>, int) => 't = "item"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
Retrieves a select object or an object from an options collection.
|
|
12
12
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/namedItem)
|
|
13
13
|
*/
|
|
14
14
|
@send
|
|
15
|
-
external namedItem: (htmlCollection
|
|
15
|
+
external namedItem: (htmlCollection<'t>, string) => 't = "namedItem"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
open DOMAPI
|
|
2
2
|
|
|
3
|
-
external asHTMLCollection: htmlFormControlsCollection => htmlCollection = "%identity"
|
|
3
|
+
external asHTMLCollection: htmlFormControlsCollection => htmlCollection<element> = "%identity"
|
|
4
4
|
/**
|
|
5
5
|
Retrieves an object from various collections.
|
|
6
6
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/item)
|
package/src/DOMAPI/NodeList.res
CHANGED
|
@@ -5,4 +5,4 @@ Returns the node with index index from the collection. The nodes are sorted in t
|
|
|
5
5
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/NodeList/item)
|
|
6
6
|
*/
|
|
7
7
|
@send
|
|
8
|
-
external item: (nodeList
|
|
8
|
+
external item: (nodeList<'tNode>, int) => 'tNode = "item"
|
package/src/DOMAPI/Window.res
CHANGED
|
@@ -514,4 +514,4 @@ external cancelIdleCallback: (window, int) => unit = "cancelIdleCallback"
|
|
|
514
514
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/getSelection)
|
|
515
515
|
*/
|
|
516
516
|
@send
|
|
517
|
-
external getSelection: window => selection = "getSelection"
|
|
517
|
+
external getSelection: window => null<selection> = "getSelection"
|
package/src/DOMAPI.res
CHANGED
|
@@ -2433,7 +2433,7 @@ type rec node = {
|
|
|
2433
2433
|
Returns the children.
|
|
2434
2434
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
2435
2435
|
*/
|
|
2436
|
-
childNodes:
|
|
2436
|
+
childNodes: nodeList<node>,
|
|
2437
2437
|
/**
|
|
2438
2438
|
Returns the first child.
|
|
2439
2439
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -2468,7 +2468,7 @@ type rec node = {
|
|
|
2468
2468
|
NodeList objects are collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll().
|
|
2469
2469
|
[See NodeList on MDN](https://developer.mozilla.org/docs/Web/API/NodeList)
|
|
2470
2470
|
*/
|
|
2471
|
-
@editor.completeFrom(NodeList) and nodeList = {
|
|
2471
|
+
@editor.completeFrom(NodeList) and nodeList<'tNode> = {
|
|
2472
2472
|
/**
|
|
2473
2473
|
Returns the number of nodes in the collection.
|
|
2474
2474
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/NodeList/length)
|
|
@@ -2476,16 +2476,6 @@ NodeList objects are collections of nodes, usually returned by properties such a
|
|
|
2476
2476
|
length: int,
|
|
2477
2477
|
}
|
|
2478
2478
|
|
|
2479
|
-
and nodeListOf<'tNode> = {
|
|
2480
|
-
// Base properties from NodeList
|
|
2481
|
-
/**
|
|
2482
|
-
Returns the number of nodes in the collection.
|
|
2483
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/NodeList/length)
|
|
2484
|
-
*/
|
|
2485
|
-
length: int,
|
|
2486
|
-
// End base properties from NodeList
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
2479
|
/**
|
|
2490
2480
|
Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element.
|
|
2491
2481
|
[See Element on MDN](https://developer.mozilla.org/docs/Web/API/Element)
|
|
@@ -2531,7 +2521,7 @@ Element is the most general base class from which all objects in a Document inhe
|
|
|
2531
2521
|
Returns the children.
|
|
2532
2522
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
2533
2523
|
*/
|
|
2534
|
-
childNodes:
|
|
2524
|
+
childNodes: nodeList<node>,
|
|
2535
2525
|
/**
|
|
2536
2526
|
Returns the first child.
|
|
2537
2527
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -2663,7 +2653,7 @@ Element is the most general base class from which all objects in a Document inhe
|
|
|
2663
2653
|
Returns the child elements.
|
|
2664
2654
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children)
|
|
2665
2655
|
*/
|
|
2666
|
-
children: htmlCollection
|
|
2656
|
+
children: htmlCollection<element>,
|
|
2667
2657
|
/**
|
|
2668
2658
|
Returns the first child that is an element, and null otherwise.
|
|
2669
2659
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild)
|
|
@@ -2905,7 +2895,7 @@ Element is the most general base class from which all objects in a Document inhe
|
|
|
2905
2895
|
Returns the children.
|
|
2906
2896
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
2907
2897
|
*/
|
|
2908
|
-
childNodes:
|
|
2898
|
+
childNodes: nodeList<node>,
|
|
2909
2899
|
/**
|
|
2910
2900
|
Returns the first child.
|
|
2911
2901
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -3001,22 +2991,12 @@ Similarly, when the focused element is in a different node tree than documentOrS
|
|
|
3001
2991
|
A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list.
|
|
3002
2992
|
[See HTMLCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection)
|
|
3003
2993
|
*/
|
|
3004
|
-
@editor.completeFrom(HTMLCollection) and htmlCollection = {
|
|
3005
|
-
/**
|
|
3006
|
-
Sets or retrieves the number of objects in a collection.
|
|
3007
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/length)
|
|
3008
|
-
*/
|
|
3009
|
-
length: int,
|
|
3010
|
-
}
|
|
3011
|
-
|
|
3012
|
-
and htmlCollectionOf<'t> = {
|
|
3013
|
-
// Base properties from HTMLCollection
|
|
2994
|
+
@editor.completeFrom(HTMLCollection) and htmlCollection<'t> = {
|
|
3014
2995
|
/**
|
|
3015
2996
|
Sets or retrieves the number of objects in a collection.
|
|
3016
2997
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/length)
|
|
3017
2998
|
*/
|
|
3018
2999
|
length: int,
|
|
3019
|
-
// End base properties from HTMLCollection
|
|
3020
3000
|
}
|
|
3021
3001
|
|
|
3022
3002
|
/**
|
|
@@ -3178,7 +3158,7 @@ Any HTML element. Some elements directly implement this interface, while others
|
|
|
3178
3158
|
Returns the children.
|
|
3179
3159
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
3180
3160
|
*/
|
|
3181
|
-
childNodes:
|
|
3161
|
+
childNodes: nodeList<node>,
|
|
3182
3162
|
/**
|
|
3183
3163
|
Returns the first child.
|
|
3184
3164
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -3551,7 +3531,7 @@ Contains the descriptive information, or metadata, for a document. This object i
|
|
|
3551
3531
|
Returns the children.
|
|
3552
3532
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
3553
3533
|
*/
|
|
3554
|
-
childNodes:
|
|
3534
|
+
childNodes: nodeList<node>,
|
|
3555
3535
|
/**
|
|
3556
3536
|
Returns the first child.
|
|
3557
3537
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -3807,7 +3787,7 @@ A <form> element in the DOM; it allows access to and in some cases modification
|
|
|
3807
3787
|
Returns the children.
|
|
3808
3788
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
3809
3789
|
*/
|
|
3810
|
-
childNodes:
|
|
3790
|
+
childNodes: nodeList<node>,
|
|
3811
3791
|
/**
|
|
3812
3792
|
Returns the first child.
|
|
3813
3793
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -4114,7 +4094,7 @@ Provides special properties and methods for manipulating <img> elements.
|
|
|
4114
4094
|
Returns the children.
|
|
4115
4095
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
4116
4096
|
*/
|
|
4117
|
-
childNodes:
|
|
4097
|
+
childNodes: nodeList<node>,
|
|
4118
4098
|
/**
|
|
4119
4099
|
Returns the first child.
|
|
4120
4100
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -4457,7 +4437,7 @@ Provides special properties (beyond the regular HTMLElement interface it also ha
|
|
|
4457
4437
|
Returns the children.
|
|
4458
4438
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
4459
4439
|
*/
|
|
4460
|
-
childNodes:
|
|
4440
|
+
childNodes: nodeList<node>,
|
|
4461
4441
|
/**
|
|
4462
4442
|
Returns the first child.
|
|
4463
4443
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -4729,7 +4709,7 @@ Hyperlink elements and provides special properties and methods (beyond those of
|
|
|
4729
4709
|
Returns the children.
|
|
4730
4710
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
4731
4711
|
*/
|
|
4732
|
-
childNodes:
|
|
4712
|
+
childNodes: nodeList<node>,
|
|
4733
4713
|
/**
|
|
4734
4714
|
Returns the first child.
|
|
4735
4715
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -5102,7 +5082,7 @@ Provides special properties and methods (beyond those of the regular object HTML
|
|
|
5102
5082
|
Returns the children.
|
|
5103
5083
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
5104
5084
|
*/
|
|
5105
|
-
childNodes:
|
|
5085
|
+
childNodes: nodeList<node>,
|
|
5106
5086
|
/**
|
|
5107
5087
|
Returns the first child.
|
|
5108
5088
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -5455,7 +5435,7 @@ HTML <script> elements expose the HTMLScriptElement interface, which provides sp
|
|
|
5455
5435
|
Returns the children.
|
|
5456
5436
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
5457
5437
|
*/
|
|
5458
|
-
childNodes:
|
|
5438
|
+
childNodes: nodeList<node>,
|
|
5459
5439
|
/**
|
|
5460
5440
|
Returns the first child.
|
|
5461
5441
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -5584,7 +5564,7 @@ and documentType = {
|
|
|
5584
5564
|
Returns the children.
|
|
5585
5565
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
5586
5566
|
*/
|
|
5587
|
-
childNodes:
|
|
5567
|
+
childNodes: nodeList<node>,
|
|
5588
5568
|
/**
|
|
5589
5569
|
Returns the first child.
|
|
5590
5570
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -5674,7 +5654,7 @@ Any web page loaded in the browser and serves as an entry point into the web pag
|
|
|
5674
5654
|
Returns the children.
|
|
5675
5655
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
5676
5656
|
*/
|
|
5677
|
-
childNodes:
|
|
5657
|
+
childNodes: nodeList<node>,
|
|
5678
5658
|
/**
|
|
5679
5659
|
Returns the first child.
|
|
5680
5660
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -5808,32 +5788,32 @@ If the contents are sandboxed into a unique origin (e.g. in an iframe with the s
|
|
|
5808
5788
|
Retrieves a collection, in source order, of img objects in the document.
|
|
5809
5789
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/images)
|
|
5810
5790
|
*/
|
|
5811
|
-
images:
|
|
5791
|
+
images: htmlCollection<htmlImageElement>,
|
|
5812
5792
|
/**
|
|
5813
5793
|
Retrieves a collection of all embed objects in the document.
|
|
5814
5794
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/embeds)
|
|
5815
5795
|
*/
|
|
5816
|
-
embeds:
|
|
5796
|
+
embeds: htmlCollection<htmlEmbedElement>,
|
|
5817
5797
|
/**
|
|
5818
5798
|
Return an HTMLCollection of the embed elements in the Document.
|
|
5819
5799
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/plugins)
|
|
5820
5800
|
*/
|
|
5821
|
-
plugins:
|
|
5801
|
+
plugins: htmlCollection<htmlEmbedElement>,
|
|
5822
5802
|
/**
|
|
5823
5803
|
Retrieves a collection of all a objects that specify the href property and all area objects in the document.
|
|
5824
5804
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/links)
|
|
5825
5805
|
*/
|
|
5826
|
-
links:
|
|
5806
|
+
links: htmlCollection<element>,
|
|
5827
5807
|
/**
|
|
5828
5808
|
Retrieves a collection, in source order, of all form objects in the document.
|
|
5829
5809
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/forms)
|
|
5830
5810
|
*/
|
|
5831
|
-
forms:
|
|
5811
|
+
forms: htmlCollection<htmlFormElement>,
|
|
5832
5812
|
/**
|
|
5833
5813
|
Retrieves a collection of all script objects in the document.
|
|
5834
5814
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/scripts)
|
|
5835
5815
|
*/
|
|
5836
|
-
scripts:
|
|
5816
|
+
scripts: htmlCollection<htmlScriptElement>,
|
|
5837
5817
|
/**
|
|
5838
5818
|
Returns the script element, or the SVG script element, that is currently executing, as long as the element represents a classic script. In the case of reentrant script execution, returns the one that most recently started executing amongst those that have not yet finished executing.
|
|
5839
5819
|
|
|
@@ -5910,7 +5890,7 @@ Similarly, when the focused element is in a different node tree than documentOrS
|
|
|
5910
5890
|
Returns the child elements.
|
|
5911
5891
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children)
|
|
5912
5892
|
*/
|
|
5913
|
-
children: htmlCollection
|
|
5893
|
+
children: htmlCollection<element>,
|
|
5914
5894
|
/**
|
|
5915
5895
|
Returns the first child that is an element, and null otherwise.
|
|
5916
5896
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild)
|
|
@@ -6142,12 +6122,12 @@ and mutationRecord = {
|
|
|
6142
6122
|
Return the nodes added and removed respectively.
|
|
6143
6123
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/addedNodes)
|
|
6144
6124
|
*/
|
|
6145
|
-
addedNodes: nodeList
|
|
6125
|
+
addedNodes: nodeList<node>,
|
|
6146
6126
|
/**
|
|
6147
6127
|
Return the nodes added and removed respectively.
|
|
6148
6128
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/removedNodes)
|
|
6149
6129
|
*/
|
|
6150
|
-
removedNodes: nodeList
|
|
6130
|
+
removedNodes: nodeList<node>,
|
|
6151
6131
|
/**
|
|
6152
6132
|
Return the previous and next sibling respectively of the added or removed nodes, and null otherwise.
|
|
6153
6133
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/previousSibling)
|
|
@@ -6220,7 +6200,7 @@ and attr = {
|
|
|
6220
6200
|
Returns the children.
|
|
6221
6201
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
6222
6202
|
*/
|
|
6223
|
-
childNodes:
|
|
6203
|
+
childNodes: nodeList<node>,
|
|
6224
6204
|
/**
|
|
6225
6205
|
Returns the first child.
|
|
6226
6206
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -6322,7 +6302,7 @@ The CharacterData abstract interface represents a Node object that contains char
|
|
|
6322
6302
|
Returns the children.
|
|
6323
6303
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
6324
6304
|
*/
|
|
6325
|
-
childNodes:
|
|
6305
|
+
childNodes: nodeList<node>,
|
|
6326
6306
|
/**
|
|
6327
6307
|
Returns the first child.
|
|
6328
6308
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -6418,7 +6398,7 @@ A minimal document object that has no parent. It is used as a lightweight versio
|
|
|
6418
6398
|
Returns the children.
|
|
6419
6399
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
6420
6400
|
*/
|
|
6421
|
-
childNodes:
|
|
6401
|
+
childNodes: nodeList<node>,
|
|
6422
6402
|
/**
|
|
6423
6403
|
Returns the first child.
|
|
6424
6404
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -6453,7 +6433,7 @@ A minimal document object that has no parent. It is used as a lightweight versio
|
|
|
6453
6433
|
Returns the child elements.
|
|
6454
6434
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children)
|
|
6455
6435
|
*/
|
|
6456
|
-
children: htmlCollection
|
|
6436
|
+
children: htmlCollection<element>,
|
|
6457
6437
|
/**
|
|
6458
6438
|
Returns the first child that is an element, and null otherwise.
|
|
6459
6439
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild)
|
|
@@ -6693,7 +6673,7 @@ A minimal document object that has no parent. It is used as a lightweight versio
|
|
|
6693
6673
|
Returns the children.
|
|
6694
6674
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
6695
6675
|
*/
|
|
6696
|
-
childNodes:
|
|
6676
|
+
childNodes: nodeList<node>,
|
|
6697
6677
|
/**
|
|
6698
6678
|
Returns the first child.
|
|
6699
6679
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
@@ -6869,7 +6849,7 @@ type elementInternals = {
|
|
|
6869
6849
|
Returns a NodeList of all the label elements that internals's target element is associated with.
|
|
6870
6850
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ElementInternals/labels)
|
|
6871
6851
|
*/
|
|
6872
|
-
labels: nodeList
|
|
6852
|
+
labels: nodeList<any>,
|
|
6873
6853
|
/**
|
|
6874
6854
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ElementInternals/states)
|
|
6875
6855
|
*/
|
|
@@ -7383,12 +7363,12 @@ type rec htmlTableElement = {
|
|
|
7383
7363
|
Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
|
|
7384
7364
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/tBodies)
|
|
7385
7365
|
*/
|
|
7386
|
-
tBodies:
|
|
7366
|
+
tBodies: htmlCollection<htmlTableSectionElement>,
|
|
7387
7367
|
/**
|
|
7388
7368
|
Sets or retrieves the number of horizontal rows contained in the object.
|
|
7389
7369
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/rows)
|
|
7390
7370
|
*/
|
|
7391
|
-
rows:
|
|
7371
|
+
rows: htmlCollection<htmlTableRowElement>,
|
|
7392
7372
|
}
|
|
7393
7373
|
|
|
7394
7374
|
/**
|
|
@@ -7409,7 +7389,7 @@ Provides special properties and methods (beyond the HTMLElement interface it als
|
|
|
7409
7389
|
Sets or retrieves the number of horizontal rows contained in the object.
|
|
7410
7390
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/rows)
|
|
7411
7391
|
*/
|
|
7412
|
-
rows:
|
|
7392
|
+
rows: htmlCollection<htmlTableRowElement>,
|
|
7413
7393
|
}
|
|
7414
7394
|
|
|
7415
7395
|
/**
|
|
@@ -7470,7 +7450,7 @@ Provides special properties and methods (beyond the HTMLElement interface it als
|
|
|
7470
7450
|
Retrieves a collection of all cells in the table row.
|
|
7471
7451
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/cells)
|
|
7472
7452
|
*/
|
|
7473
|
-
cells:
|
|
7453
|
+
cells: htmlCollection<htmlTableCellElement>,
|
|
7474
7454
|
}
|
|
7475
7455
|
|
|
7476
7456
|
/**
|
|
@@ -7538,7 +7518,7 @@ type rec htmlButtonElement = {
|
|
|
7538
7518
|
/**
|
|
7539
7519
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/labels)
|
|
7540
7520
|
*/
|
|
7541
|
-
labels:
|
|
7521
|
+
labels: nodeList<htmlLabelElement>,
|
|
7542
7522
|
/**
|
|
7543
7523
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/popoverTargetElement)
|
|
7544
7524
|
*/
|
|
@@ -7673,7 +7653,7 @@ Provides special properties and methods for manipulating the layout and presenta
|
|
|
7673
7653
|
/**
|
|
7674
7654
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/labels)
|
|
7675
7655
|
*/
|
|
7676
|
-
labels:
|
|
7656
|
+
labels: nodeList<htmlLabelElement>,
|
|
7677
7657
|
/**
|
|
7678
7658
|
Gets or sets the starting position or offset of a text selection.
|
|
7679
7659
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionStart)
|
|
@@ -7740,7 +7720,7 @@ Can be set, to change the value.
|
|
|
7740
7720
|
/**
|
|
7741
7721
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/labels)
|
|
7742
7722
|
*/
|
|
7743
|
-
labels:
|
|
7723
|
+
labels: nodeList<htmlLabelElement>,
|
|
7744
7724
|
}
|
|
7745
7725
|
|
|
7746
7726
|
/**
|
|
@@ -7929,7 +7909,7 @@ Provides special properties and methods for manipulating the options, layout, an
|
|
|
7929
7909
|
/**
|
|
7930
7910
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/labels)
|
|
7931
7911
|
*/
|
|
7932
|
-
labels: Null.t<
|
|
7912
|
+
labels: Null.t<nodeList<htmlLabelElement>>,
|
|
7933
7913
|
/**
|
|
7934
7914
|
Gets or sets the starting position or offset of a text selection.
|
|
7935
7915
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionStart)
|
|
@@ -7976,7 +7956,7 @@ Provides special properties (beyond the HTMLElement object interface it also has
|
|
|
7976
7956
|
Returns an HTMLCollection of the option elements of the datalist element.
|
|
7977
7957
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLDataListElement/options)
|
|
7978
7958
|
*/
|
|
7979
|
-
options:
|
|
7959
|
+
options: htmlCollection<htmlOptionElement>,
|
|
7980
7960
|
}
|
|
7981
7961
|
|
|
7982
7962
|
/**
|
|
@@ -8033,7 +8013,7 @@ A <select> HTML Element. These elements also share all of the properties and met
|
|
|
8033
8013
|
/**
|
|
8034
8014
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/selectedOptions)
|
|
8035
8015
|
*/
|
|
8036
|
-
selectedOptions:
|
|
8016
|
+
selectedOptions: htmlCollection<htmlOptionElement>,
|
|
8037
8017
|
/**
|
|
8038
8018
|
Sets or retrieves the index of the selected option in a select object.
|
|
8039
8019
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/selectedIndex)
|
|
@@ -8062,7 +8042,7 @@ A <select> HTML Element. These elements also share all of the properties and met
|
|
|
8062
8042
|
/**
|
|
8063
8043
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/labels)
|
|
8064
8044
|
*/
|
|
8065
|
-
labels:
|
|
8045
|
+
labels: nodeList<htmlLabelElement>,
|
|
8066
8046
|
}
|
|
8067
8047
|
|
|
8068
8048
|
/**
|
|
@@ -8117,7 +8097,7 @@ HTMLOptionsCollection is an interface representing a collection of HTML option e
|
|
|
8117
8097
|
[See HTMLOptionsCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection)
|
|
8118
8098
|
*/
|
|
8119
8099
|
@editor.completeFrom(HTMLOptionsCollection) and htmlOptionsCollection = {
|
|
8120
|
-
...
|
|
8100
|
+
...htmlCollection<htmlOptionElement>,
|
|
8121
8101
|
/**
|
|
8122
8102
|
Returns the index of the first selected item, if any, or −1 if there is no selected item.
|
|
8123
8103
|
|
|
@@ -8411,7 +8391,7 @@ type htmlFieldSetElement = {
|
|
|
8411
8391
|
Returns an HTMLCollection of the form controls in the element.
|
|
8412
8392
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/elements)
|
|
8413
8393
|
*/
|
|
8414
|
-
elements: htmlCollection
|
|
8394
|
+
elements: htmlCollection<element>,
|
|
8415
8395
|
/**
|
|
8416
8396
|
Returns whether an element will successfully validate based on forms validation rules and constraints.
|
|
8417
8397
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/willValidate)
|
|
@@ -8636,7 +8616,7 @@ type htmlMapElement = {
|
|
|
8636
8616
|
Retrieves a collection of the area objects defined for the given map object.
|
|
8637
8617
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMapElement/areas)
|
|
8638
8618
|
*/
|
|
8639
|
-
areas: htmlCollection
|
|
8619
|
+
areas: htmlCollection<element>,
|
|
8640
8620
|
}
|
|
8641
8621
|
|
|
8642
8622
|
/**
|
|
@@ -8709,7 +8689,7 @@ type htmlMeterElement = {
|
|
|
8709
8689
|
/**
|
|
8710
8690
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/labels)
|
|
8711
8691
|
*/
|
|
8712
|
-
labels:
|
|
8692
|
+
labels: nodeList<htmlLabelElement>,
|
|
8713
8693
|
}
|
|
8714
8694
|
|
|
8715
8695
|
/**
|
|
@@ -8878,7 +8858,7 @@ type htmlProgressElement = {
|
|
|
8878
8858
|
/**
|
|
8879
8859
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLProgressElement/labels)
|
|
8880
8860
|
*/
|
|
8881
|
-
labels:
|
|
8861
|
+
labels: nodeList<htmlLabelElement>,
|
|
8882
8862
|
}
|
|
8883
8863
|
|
|
8884
8864
|
/**
|
package/src/Global.res
CHANGED
|
@@ -744,4 +744,4 @@ external cancelIdleCallback: int => unit = "cancelIdleCallback"
|
|
|
744
744
|
/**
|
|
745
745
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/getSelection)
|
|
746
746
|
*/
|
|
747
|
-
external getSelection: unit => selection = "getSelection"
|
|
747
|
+
external getSelection: unit => null<selection> = "getSelection"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
open DOMAPI
|
|
2
|
-
|
|
3
|
-
external asHTMLCollection: htmlCollectionOf<'t> => htmlCollection = "%identity"
|
|
4
|
-
/**
|
|
5
|
-
Retrieves an object from various collections.
|
|
6
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/item)
|
|
7
|
-
*/
|
|
8
|
-
@send
|
|
9
|
-
external item: (htmlCollectionOf<'t>, int) => element = "item"
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
Retrieves a select object or an object from an options collection.
|
|
13
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/namedItem)
|
|
14
|
-
*/
|
|
15
|
-
@send
|
|
16
|
-
external namedItem: (htmlCollectionOf<'t>, string) => element = "namedItem"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
open DOMAPI
|
|
2
|
-
|
|
3
|
-
external asNodeList: nodeListOf<'tNode> => nodeList = "%identity"
|
|
4
|
-
/**
|
|
5
|
-
Returns the node with index index from the collection. The nodes are sorted in tree order.
|
|
6
|
-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/NodeList/item)
|
|
7
|
-
*/
|
|
8
|
-
@send
|
|
9
|
-
external item: (nodeListOf<'tNode>, int) => node = "item"
|