@rescript/webapi 0.1.0-experimental-3cb774d → 0.1.0-experimental-21475fa

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescript/webapi",
3
- "version": "0.1.0-experimental-3cb774d",
3
+ "version": "0.1.0-experimental-21475fa",
4
4
  "description": "Experimental successor to [rescript-webapi](https://github.com/TheSpyder/rescript-webapi)",
5
5
  "keywords": [
6
6
  "dom",
@@ -44,7 +44,7 @@
44
44
  "@astrojs/starlight": "0.37.7",
45
45
  "astro": "^5.10.1",
46
46
  "micromark": "^4.0.1",
47
- "oxfmt": "^0.40.0",
47
+ "oxfmt": "^0.41.0",
48
48
  "prettier": "^3.3.3",
49
49
  "prettier-plugin-astro": "^0.14.1",
50
50
  "rescript": ">=12.0.0 <13",
@@ -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