@rescript/webapi 0.1.0-experimental-cf878fa → 0.1.0-experimental-dfaee50
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
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)
|
|
@@ -443,7 +443,7 @@ Returns an object representing the current selection of the document that is loa
|
|
|
443
443
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getSelection)
|
|
444
444
|
*/
|
|
445
445
|
@send
|
|
446
|
-
external getSelection: document => selection = "getSelection"
|
|
446
|
+
external getSelection: document => null<selection> = "getSelection"
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
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.
|
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/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"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
open DOMAPI
|
|
2
|
+
open MutationObserverAPI
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver)
|
|
6
|
+
*/
|
|
7
|
+
@new
|
|
8
|
+
external make: mutationObserverCallback => mutationObserver = "MutationObserver"
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/observe)
|
|
12
|
+
*/
|
|
13
|
+
@send
|
|
14
|
+
external observe: (mutationObserver, ~target: node, ~options: mutationObserverInit=?) => unit =
|
|
15
|
+
"observe"
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/disconnect)
|
|
19
|
+
*/
|
|
20
|
+
@send
|
|
21
|
+
external disconnect: mutationObserver => unit = "disconnect"
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/takeRecords)
|
|
25
|
+
*/
|
|
26
|
+
@send
|
|
27
|
+
external takeRecords: mutationObserver => array<mutationRecord> = "takeRecords"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
open DOMAPI
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
[See MutationObserver on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver)
|
|
5
|
+
*/
|
|
6
|
+
@editor.completeFrom(MutationObserver)
|
|
7
|
+
type mutationObserver
|
|
8
|
+
|
|
9
|
+
type mutationObserverInit = {
|
|
10
|
+
mutable childList?: bool,
|
|
11
|
+
mutable attributes?: bool,
|
|
12
|
+
mutable characterData?: bool,
|
|
13
|
+
mutable subtree?: bool,
|
|
14
|
+
mutable attributeOldValue?: bool,
|
|
15
|
+
mutable characterDataOldValue?: bool,
|
|
16
|
+
mutable attributeFilter?: array<string>,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
type mutationObserverCallback = (array<mutationRecord>, mutationObserver) => unit
|