From 9430c006cdc7f7fd8b6fcd988c40d0b2ff9bf1f5 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Mon, 16 Nov 2026 13:42:05 -0500 Subject: [PATCH 1/7] feat(webapi): isolate History and Location features [Codex] --- CHANGELOG.md | 2 +- README.md | 4 +- docs/content/docs/api-surface.mdx | 30 +++- docs/content/docs/contributing/releasing.mdx | 2 +- docs/content/docs/contributing/testing.mdx | 2 +- docs/content/docs/index.mdx | 6 +- docs/content/docs/philosophy.mdx | 2 +- docs/content/docs/project-status.mdx | 4 +- package-lock.json | 157 +++++++++---------- package.json | 4 +- rescript.json | 18 ++- scripts/check-consumer.mjs | 9 +- scripts/check-features.mjs | 4 +- scripts/check-features.test.mjs | 33 +++- src/{window => history}/History.res | 0 src/{window => history}/HistoryTypes.res | 0 src/{window => location}/Location.res | 0 tests/DOMAPI/ImageData__test.res | 2 +- 18 files changed, 175 insertions(+), 104 deletions(-) rename src/{window => history}/History.res (100%) rename src/{window => history}/HistoryTypes.res (100%) rename src/{window => location}/Location.res (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0835093c..a65f23ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ are maintained by the release workflow; see the [alpha release readiness tracker ## 1.0.0-alpha.1 (candidate) -Planned first release in the `1.0.0-alpha.N` series. ReScript `13.0.0-alpha.5` is the tested +Planned first release in the `1.0.0-alpha.N` series. ReScript `13.0.0-alpha.7` is the tested compiler baseline. This alpha is not a stable API; review the migration notes below before upgrading from earlier prereleases. The release workflow is the source of truth for actual versioning and publication. diff --git a/README.md b/README.md index 13fce610..82416a53 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Experimental successor to [rescript-webapi](https://github.com/TheSpyder/rescrip ## Getting started -ReScript `13.0.0-alpha.5` is the tested compiler baseline. Library alpha releases may contain +ReScript `13.0.0-alpha.7` is the tested compiler baseline. Library alpha releases may contain breaking changes. See the [project status](https://rescript-lang.github.io/experimental-rescript-webapi/project-status/) for the accepted peer range and its testing limits. @@ -14,7 +14,7 @@ Install the library and compiler in your application: ```shell npm install @rescript/webapi@alpha -npm install --save-dev rescript@13.0.0-alpha.5 +npm install --save-dev rescript@13.0.0-alpha.7 ``` The `@alpha` command targets the published alpha dist-tag. The planned `1.0.0-alpha.1` candidate diff --git a/docs/content/docs/api-surface.mdx b/docs/content/docs/api-surface.mdx index a43cccb1..48a0f51d 100644 --- a/docs/content/docs/api-surface.mdx +++ b/docs/content/docs/api-surface.mdx @@ -4,13 +4,13 @@ description: A practical summary of how to use the public @rescript/webapi modul slug: "api-surface" --- -The package exposes browser APIs under the `WebAPI` namespace. ReScript `13.0.0-alpha.5` is +The package exposes browser APIs under the `WebAPI` namespace. ReScript `13.0.0-alpha.7` is the tested compiler baseline, and alpha releases may contain breaking changes. See [project status](../project-status/) for the accepted peer range and its testing limits, and the [migration notes](https://github.com/rescript-lang/experimental-rescript-webapi/blob/main/CHANGELOG.md) for API changes. -Install `@rescript/webapi@alpha` and `rescript@13.0.0-alpha.5`, then add the package dependency. +Install `@rescript/webapi@alpha` and `rescript@13.0.0-alpha.7`, then add the package dependency. Feature bundles are optional when consumers need to restrict compiled modules: ```json @@ -81,6 +81,7 @@ WebAPI.URL WebAPI.Fetch WebAPI.UIEvents WebAPI.Observers WebAPI.Media WebAPI.WebAudio WebAPI.Storage WebAPI.Messaging WebAPI.Workers WebAPI.Crypto WebAPI.Performance WebAPI.ViewTransitions +WebAPI.History WebAPI.Location WebAPI.SafeFetch ``` @@ -106,6 +107,31 @@ helpers can select only the safe feature: The `let?` examples below require the experimental `LetUnwrap` setting with the current ReScript 13 alpha compiler. The SafeFetch API itself can also be used with ordinary `switch` expressions. +### DOM types without the Window bundle + +`WebAPI.History` independently exposes `WebAPI.History` and its existing +`WebAPI.History.Types.history` type. `WebAPI.Location` exposes `WebAPI.Location` +and depends only on the core `WebAPI.DOM` feature. `WebAPI.Window` includes both +features, so existing Window consumers keep the same API and type identities. + +For React bindings that need element, event, window, document, history, and location +types without the complete Window API, select: + +```json +{ + "dependencies": [ + { + "name": "@rescript/webapi", + "features": ["WebAPI.DOMNodes", "WebAPI.History", "WebAPI.Location"] + } + ] +} +``` + +DOMNodes already includes DOM transitively. This selection does not expose +`WebAPI.Window` or `WebAPI.Document`; add `WebAPI.Window` if you need their methods. +An unrestricted WebAPI dependency elsewhere in the dependency graph enables all features. + ## Fetch Use `WebAPI.Fetch.fetch` for string URLs and `WebAPI.Fetch.fetchWithRequest` diff --git a/docs/content/docs/contributing/releasing.mdx b/docs/content/docs/contributing/releasing.mdx index 678a60f3..0137a9ad 100644 --- a/docs/content/docs/contributing/releasing.mdx +++ b/docs/content/docs/contributing/releasing.mdx @@ -6,7 +6,7 @@ slug: "08-alpha-releases" The release checklist for `@rescript/webapi` is tracked in [#382](https://github.com/rescript-lang/experimental-rescript-webapi/issues/382). ReScript -`13.0.0-alpha.5` is the tested compiler baseline. A stable compiler is not a prerequisite; +`13.0.0-alpha.7` is the tested compiler baseline. A stable compiler is not a prerequisite; library alpha releases may include breaking changes between versions. ## Prepare a candidate diff --git a/docs/content/docs/contributing/testing.mdx b/docs/content/docs/contributing/testing.mdx index 29571fb5..c2b378f2 100644 --- a/docs/content/docs/contributing/testing.mdx +++ b/docs/content/docs/contributing/testing.mdx @@ -74,7 +74,7 @@ Run `npm run check:consumer` to pack the current package, install that artifact ReScript compiler in a fresh temporary project, and compile representative feature consumers. This verifies the installed tarball rather than copied source files or local compiler links. The development compiler and the exact version exercised by this check are ReScript -`13.0.0-alpha.5`. The peer range `>=13.0.0-alpha.5 <13.0.0` admits later `13.0.0` prereleases; +`13.0.0-alpha.7`. The peer range `>=13.0.0-alpha.7 <13.0.0` admits later `13.0.0` prereleases; it does not claim support for earlier compilers or stable `13.0.0`. ## Why add tests? diff --git a/docs/content/docs/index.mdx b/docs/content/docs/index.mdx index 52a3628c..1b05c90f 100644 --- a/docs/content/docs/index.mdx +++ b/docs/content/docs/index.mdx @@ -23,7 +23,7 @@ import { Tabs, TabItem, Code } from "@astrojs/starlight/components"; ## Installation -ReScript `13.0.0-alpha.5` is the tested compiler baseline, and library alpha releases may +ReScript `13.0.0-alpha.7` is the tested compiler baseline, and library alpha releases may include breaking changes. See [project status](./project-status/) for the accepted peer range and its testing limits. @@ -34,14 +34,14 @@ Install the package and tested compiler: diff --git a/docs/content/docs/philosophy.mdx b/docs/content/docs/philosophy.mdx index 04c156cb..59d6bb48 100644 --- a/docs/content/docs/philosophy.mdx +++ b/docs/content/docs/philosophy.mdx @@ -8,7 +8,7 @@ The core idea of these ReScript bindings is that each interface is modeled as a ## ReScript 13 alpha compatibility -This project currently supports ReScript `13.0.0-alpha.5`. ReScript 13 is still an alpha, and +This project currently supports ReScript `13.0.0-alpha.7`. ReScript 13 is still an alpha, and the library may continue to publish `1.0.0-alpha.N` releases alongside it. Library alpha releases may include breaking API changes; a stable ReScript compiler is not required to use or release this library's alpha versions. See the [API surface](../api-surface/) for the public module layout diff --git a/docs/content/docs/project-status.mdx b/docs/content/docs/project-status.mdx index d7528876..e31c7f74 100644 --- a/docs/content/docs/project-status.mdx +++ b/docs/content/docs/project-status.mdx @@ -10,8 +10,8 @@ varies by API and browser support is determined by the host runtime, not by whet module compiles. `@rescript/webapi` alpha versions can make breaking API changes between releases. ReScript -`13.0.0-alpha.5` is the tested compiler baseline. The package peer range accepts -`>=13.0.0-alpha.5 <13.0.0`, which allows later `13.0.0` prereleases but does not claim each one +`13.0.0-alpha.7` is the tested compiler baseline. The package peer range accepts +`>=13.0.0-alpha.7 <13.0.0`, which allows later `13.0.0` prereleases but does not claim each one is tested; stable ReScript is not currently included in that range or required to ship this alpha. diff --git a/package-lock.json b/package-lock.json index 0f6de392..e20dd3fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,12 +17,12 @@ "oxfmt": "^0.76.0", "prettier": "^3.8.3", "prettier-plugin-astro": "^1.0.0", - "rescript": "13.0.0-alpha.5", + "rescript": "13.0.0-alpha.7", "sharp": "^0.35.3", "ws": "^8.22.1" }, "peerDependencies": { - "rescript": ">=13.0.0-alpha.5 <13.0.0" + "rescript": ">=13.0.0-alpha.7 <13.0.0" } }, "node_modules/@astrojs/compiler-binding": { @@ -1836,89 +1836,79 @@ "license": "MIT" }, "node_modules/@rescript/darwin-arm64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/darwin-arm64/-/darwin-arm64-13.0.0-alpha.5.tgz", - "integrity": "sha512-OCpT4VYLkxTjm56y+CG4SfrqotMLCaqKY5pxGq75hOPRZLZ5n5BG3OvA1rBsmz5+gT7VpKm1Do9YhmO0JvYZfg==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/darwin-arm64/-/darwin-arm64-13.0.0-alpha.7.tgz", + "integrity": "sha512-jAoS+bjMRQ2HEvZAo/I3gETmp5lZ/wOMtj9XklbcJvttDwhZUuZ3r8NFYwhbY+hFiCe5mWKgJaBKzMM1glKKLQ==", "cpu": [ "arm64" ], "dev": true, + "license": "(LGPL-3.0-or-later AND MIT)", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=20.11.0" - } - }, - "node_modules/@rescript/darwin-x64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/darwin-x64/-/darwin-x64-13.0.0-alpha.5.tgz", - "integrity": "sha512-UT143XnOVmUUayrD/1ceKrXb8rbhNmXKhhfnTnRGRLWp1Hxyiq5uq3OGNorSIW6jHsszsP0VvjKA+Z31h04E6Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=20.11.0" + "node": ">=22" } }, "node_modules/@rescript/linux-arm64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/linux-arm64/-/linux-arm64-13.0.0-alpha.5.tgz", - "integrity": "sha512-lQ3trljExrH1uqS3hsjjoi6fnaImG/tYppcF2X4Yk8u0AP1t6AC6LUM0KR2kjctG5b7OVUrujOu91NnjovN46A==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/linux-arm64/-/linux-arm64-13.0.0-alpha.7.tgz", + "integrity": "sha512-wVwmKc64b6dQWuC6bfCh4F/ULSyEwZx7zQx07uQ6lvVJg+VonfEEr1J8R3SVVWvvUycYYCYnaXaCheH1V28Lpw==", "cpu": [ "arm64" ], "dev": true, + "license": "(LGPL-3.0-or-later AND MIT)", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.11.0" + "node": ">=22" } }, "node_modules/@rescript/linux-x64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/linux-x64/-/linux-x64-13.0.0-alpha.5.tgz", - "integrity": "sha512-Cu73xGa2nMcSgW274tAJDexlBqJGFKpv/v9wHAxqFxXzIwSkET51N9xkf42GljejeVzwyDEfgQId2Znme/PWkg==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/linux-x64/-/linux-x64-13.0.0-alpha.7.tgz", + "integrity": "sha512-bm2FdxeJe61/5rk7q1qfdX74OjhdIqByKub+hg+t6XgiSXYUx5dW12hBfxzrM+IzoTNeZetuIfjbZKvH8Q9JAQ==", "cpu": [ "x64" ], "dev": true, + "license": "(LGPL-3.0-or-later AND MIT)", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.11.0" + "node": ">=22" } }, "node_modules/@rescript/runtime": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/runtime/-/runtime-13.0.0-alpha.5.tgz", - "integrity": "sha512-k0iQhrDasCD5K5orSrps21ZVgvMgOIwh03QjUAxtMkVwyPclg6LbgG5eAAgduyecXXm3ii30o3nDaXvCryu/Tw==", - "dev": true + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/runtime/-/runtime-13.0.0-alpha.7.tgz", + "integrity": "sha512-NUXP0XgObn1lg9p9ZHQqq72xDf0wqh0yUYmQvO3JFrQdeNM6c+LfDoJkFoJob5pWS0C3vSxy77MqTneoYodC+A==", + "dev": true, + "license": "MIT" }, "node_modules/@rescript/win32-x64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/win32-x64/-/win32-x64-13.0.0-alpha.5.tgz", - "integrity": "sha512-7uUkUY0pXDdPB5znHQYWsGml3E2pQ68KSaM7HZoFfnOEIuPqGz/hssgLgsXHkfHxrHB0waX9fsqx2Qckn6IGsw==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/win32-x64/-/win32-x64-13.0.0-alpha.7.tgz", + "integrity": "sha512-9gxxtwYt4N5FbyFnqka6xpwtu4AP7UlvdXK9nz2zNUusjqNmggXOAvSd9zI/RuvG08nEEAXPfF7dkZ/hM9aJ1w==", "cpu": [ - "x64" + "x64", + "arm64" ], "dev": true, + "license": "(LGPL-3.0-or-later AND MIT)", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=20.11.0" + "node": ">=22" } }, "node_modules/@rolldown/binding-android-arm-eabi": { @@ -5228,27 +5218,42 @@ } }, "node_modules/rescript": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-13.0.0-alpha.5.tgz", - "integrity": "sha512-rv/xA1OQLN5l90/szD82IR8p/bNzwKNPLnEVaR89oiuBZYG7IhHfRxEKAvpOHqlrpnV8zKmc16IXcjCQxlni/w==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-13.0.0-alpha.7.tgz", + "integrity": "sha512-xsQALc6IlT7bUAXDw/I9HEcruE1py7OB0z9GQ/4bp8XSAhCTLhNkGQo9QBkAzl9fUaOji3EymYetJ3TYD1tPVg==", "dev": true, - "dependencies": { - "@rescript/runtime": "13.0.0-alpha.5" + "license": "(LGPL-3.0-or-later AND MIT)", + "workspaces": [ + "packages/dev-playground", + "packages/playground", + "packages/@rescript/*", + "tests/dependencies/**", + "tests/analysis_tests/**", + "tests/docstring_tests", + "tests/belt_tests", + "tests/gentype_tests/**", + "tests/tests", + "tests/tools_tests", + "tests/commonjs_tests", + "scripts/res" + ], + "dependencies": { + "@rescript/runtime": "13.0.0-alpha.7" }, "bin": { "bsc": "cli/bsc.js", "rescript": "cli/rescript.js", + "rescript-rust": "cli/rescript-rust.js", "rescript-tools": "cli/rescript-tools.js" }, "engines": { "node": ">=22" }, "optionalDependencies": { - "@rescript/darwin-arm64": "13.0.0-alpha.5", - "@rescript/darwin-x64": "13.0.0-alpha.5", - "@rescript/linux-arm64": "13.0.0-alpha.5", - "@rescript/linux-x64": "13.0.0-alpha.5", - "@rescript/win32-x64": "13.0.0-alpha.5" + "@rescript/darwin-arm64": "13.0.0-alpha.7", + "@rescript/linux-arm64": "13.0.0-alpha.7", + "@rescript/linux-x64": "13.0.0-alpha.7", + "@rescript/win32-x64": "13.0.0-alpha.7" } }, "node_modules/resolve-pkg-maps": { @@ -7078,43 +7083,36 @@ "dev": true }, "@rescript/darwin-arm64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/darwin-arm64/-/darwin-arm64-13.0.0-alpha.5.tgz", - "integrity": "sha512-OCpT4VYLkxTjm56y+CG4SfrqotMLCaqKY5pxGq75hOPRZLZ5n5BG3OvA1rBsmz5+gT7VpKm1Do9YhmO0JvYZfg==", - "dev": true, - "optional": true - }, - "@rescript/darwin-x64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/darwin-x64/-/darwin-x64-13.0.0-alpha.5.tgz", - "integrity": "sha512-UT143XnOVmUUayrD/1ceKrXb8rbhNmXKhhfnTnRGRLWp1Hxyiq5uq3OGNorSIW6jHsszsP0VvjKA+Z31h04E6Q==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/darwin-arm64/-/darwin-arm64-13.0.0-alpha.7.tgz", + "integrity": "sha512-jAoS+bjMRQ2HEvZAo/I3gETmp5lZ/wOMtj9XklbcJvttDwhZUuZ3r8NFYwhbY+hFiCe5mWKgJaBKzMM1glKKLQ==", "dev": true, "optional": true }, "@rescript/linux-arm64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/linux-arm64/-/linux-arm64-13.0.0-alpha.5.tgz", - "integrity": "sha512-lQ3trljExrH1uqS3hsjjoi6fnaImG/tYppcF2X4Yk8u0AP1t6AC6LUM0KR2kjctG5b7OVUrujOu91NnjovN46A==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/linux-arm64/-/linux-arm64-13.0.0-alpha.7.tgz", + "integrity": "sha512-wVwmKc64b6dQWuC6bfCh4F/ULSyEwZx7zQx07uQ6lvVJg+VonfEEr1J8R3SVVWvvUycYYCYnaXaCheH1V28Lpw==", "dev": true, "optional": true }, "@rescript/linux-x64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/linux-x64/-/linux-x64-13.0.0-alpha.5.tgz", - "integrity": "sha512-Cu73xGa2nMcSgW274tAJDexlBqJGFKpv/v9wHAxqFxXzIwSkET51N9xkf42GljejeVzwyDEfgQId2Znme/PWkg==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/linux-x64/-/linux-x64-13.0.0-alpha.7.tgz", + "integrity": "sha512-bm2FdxeJe61/5rk7q1qfdX74OjhdIqByKub+hg+t6XgiSXYUx5dW12hBfxzrM+IzoTNeZetuIfjbZKvH8Q9JAQ==", "dev": true, "optional": true }, "@rescript/runtime": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/runtime/-/runtime-13.0.0-alpha.5.tgz", - "integrity": "sha512-k0iQhrDasCD5K5orSrps21ZVgvMgOIwh03QjUAxtMkVwyPclg6LbgG5eAAgduyecXXm3ii30o3nDaXvCryu/Tw==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/runtime/-/runtime-13.0.0-alpha.7.tgz", + "integrity": "sha512-NUXP0XgObn1lg9p9ZHQqq72xDf0wqh0yUYmQvO3JFrQdeNM6c+LfDoJkFoJob5pWS0C3vSxy77MqTneoYodC+A==", "dev": true }, "@rescript/win32-x64": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/@rescript/win32-x64/-/win32-x64-13.0.0-alpha.5.tgz", - "integrity": "sha512-7uUkUY0pXDdPB5znHQYWsGml3E2pQ68KSaM7HZoFfnOEIuPqGz/hssgLgsXHkfHxrHB0waX9fsqx2Qckn6IGsw==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@rescript/win32-x64/-/win32-x64-13.0.0-alpha.7.tgz", + "integrity": "sha512-9gxxtwYt4N5FbyFnqka6xpwtu4AP7UlvdXK9nz2zNUusjqNmggXOAvSd9zI/RuvG08nEEAXPfF7dkZ/hM9aJ1w==", "dev": true, "optional": true }, @@ -9134,17 +9132,16 @@ } }, "rescript": { - "version": "13.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-13.0.0-alpha.5.tgz", - "integrity": "sha512-rv/xA1OQLN5l90/szD82IR8p/bNzwKNPLnEVaR89oiuBZYG7IhHfRxEKAvpOHqlrpnV8zKmc16IXcjCQxlni/w==", + "version": "13.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-13.0.0-alpha.7.tgz", + "integrity": "sha512-xsQALc6IlT7bUAXDw/I9HEcruE1py7OB0z9GQ/4bp8XSAhCTLhNkGQo9QBkAzl9fUaOji3EymYetJ3TYD1tPVg==", "dev": true, "requires": { - "@rescript/darwin-arm64": "13.0.0-alpha.5", - "@rescript/darwin-x64": "13.0.0-alpha.5", - "@rescript/linux-arm64": "13.0.0-alpha.5", - "@rescript/linux-x64": "13.0.0-alpha.5", - "@rescript/runtime": "13.0.0-alpha.5", - "@rescript/win32-x64": "13.0.0-alpha.5" + "@rescript/darwin-arm64": "13.0.0-alpha.7", + "@rescript/linux-arm64": "13.0.0-alpha.7", + "@rescript/linux-x64": "13.0.0-alpha.7", + "@rescript/runtime": "13.0.0-alpha.7", + "@rescript/win32-x64": "13.0.0-alpha.7" } }, "resolve-pkg-maps": { diff --git a/package.json b/package.json index 8c5e3984..5e19d801 100644 --- a/package.json +++ b/package.json @@ -59,12 +59,12 @@ "oxfmt": "^0.76.0", "prettier": "^3.8.3", "prettier-plugin-astro": "^1.0.0", - "rescript": "13.0.0-alpha.5", + "rescript": "13.0.0-alpha.7", "sharp": "^0.35.3", "ws": "^8.22.1" }, "peerDependencies": { - "rescript": ">=13.0.0-alpha.5 <13.0.0" + "rescript": ">=13.0.0-alpha.7 <13.0.0" }, "overrides": { "mdast-util-to-hast": "^13.2.1", diff --git a/rescript.json b/rescript.json index 8ac1cd9c..83f718c2 100644 --- a/rescript.json +++ b/rescript.json @@ -19,7 +19,11 @@ "DOMNodes" ], "WebAPI.HTML": ["WebAPI.DOMNodes", "WebAPI.File", "HTML"], + "WebAPI.History": ["History"], + "WebAPI.Location": ["WebAPI.DOM", "Location"], "WebAPI.Window": [ + "WebAPI.History", + "WebAPI.Location", "WebAPI.HTML", "WebAPI.Media", "WebAPI.Storage", @@ -294,6 +298,18 @@ "HTMLUnknownElement" ] }, + { + "dir": "src/history", + "subdirs": true, + "feature": "History", + "public": ["History"] + }, + { + "dir": "src/location", + "subdirs": true, + "feature": "Location", + "public": ["Location"] + }, { "dir": "src/window", "subdirs": true, @@ -301,9 +317,7 @@ "public": [ "CustomElementRegistry", "Document", - "History", "IdleDeadline", - "Location", "VisualViewport", "Window", "XPathExpression", diff --git a/scripts/check-consumer.mjs b/scripts/check-consumer.mjs index 9f1ec437..5be3577c 100644 --- a/scripts/check-consumer.mjs +++ b/scripts/check-consumer.mjs @@ -7,10 +7,11 @@ import { validateReleaseArtifact } from "./validate-release-artifact.mjs"; const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); const packageJson = JSON.parse(readFileSync(path.join(repoRoot, "package.json"), "utf8")); -const compilerVersion = "13.0.0-alpha.5"; +const compilerVersion = packageJson.devDependencies.rescript; +const compilerPeerRange = `>=${compilerVersion} <13.0.0`; if ( - packageJson.devDependencies.rescript !== compilerVersion || - packageJson.peerDependencies.rescript !== ">=13.0.0-alpha.5 <13.0.0" + !/^13\.0\.0-alpha\.\d+$/.test(compilerVersion) || + packageJson.peerDependencies.rescript !== compilerPeerRange ) { throw new Error("The tested compiler and package peer range are inconsistent."); } @@ -119,7 +120,7 @@ const verifyUnsupportedCompiler = (directory, tarballPath) => { if ( result.status === 0 || !output.includes("@rescript/webapi") || - !output.includes(">=13.0.0-alpha.5 <13.0.0") + !output.includes(compilerPeerRange) ) { throw new Error( `Unsupported compiler installation did not explain the peer constraint:\n${output}`, diff --git a/scripts/check-features.mjs b/scripts/check-features.mjs index 03ddf84b..4b2940d0 100644 --- a/scripts/check-features.mjs +++ b/scripts/check-features.mjs @@ -25,6 +25,8 @@ const expectedFeatureOwners = new Map([ ["WebAPI.DOMNodes", "DOMNodes"], ["WebAPI.File", "File"], ["WebAPI.HTML", "HTML"], + ["WebAPI.History", "History"], + ["WebAPI.Location", "Location"], ["WebAPI.Window", "Window"], ["WebAPI.CSSOM", "CSSOM"], ["WebAPI.CSSFontLoading", "CSSFontLoading"], @@ -237,7 +239,7 @@ const validateCompletionAliases = (sourceEntries) => { ); }; -const validateConfig = (config) => { +export const validateConfig = (config) => { const featureEntries = Object.entries(config.features ?? {}); const sourceEntries = (config.sources ?? []).filter( (source) => source !== null && typeof source === "object" && typeof source.feature === "string", diff --git a/scripts/check-features.test.mjs b/scripts/check-features.test.mjs index 590b42c8..70353ed6 100644 --- a/scripts/check-features.test.mjs +++ b/scripts/check-features.test.mjs @@ -1,7 +1,12 @@ import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; import test from "node:test"; -import { isMissingSafeFetchDiagnostic, parsePublicTypeAlias } from "./check-features.mjs"; +import { + isMissingSafeFetchDiagnostic, + parsePublicTypeAlias, + validateConfig, +} from "./check-features.mjs"; test("parses a public type alias without type parameters", () => { assert.deepEqual(parsePublicTypeAlias("type t = DOMTree.element"), { @@ -17,6 +22,32 @@ test("parses a public type alias with type parameters", () => { }); }); +const config = JSON.parse(readFileSync(new URL("../rescript.json", import.meta.url), "utf8")); + +test("validates independent History and Location feature ownership", () => { + assert.deepEqual(validateConfig(config), []); + assert.deepEqual(config.features["WebAPI.History"], ["History"]); + assert.deepEqual(config.features["WebAPI.Location"], ["WebAPI.DOM", "Location"]); + assert.ok(config.features["WebAPI.Window"].includes("WebAPI.History")); + assert.ok(config.features["WebAPI.Window"].includes("WebAPI.Location")); +}); + +test("rejects a missing History feature", () => { + const features = Object.fromEntries( + Object.entries(config.features).filter(([name]) => name !== "WebAPI.History"), + ); + assert.ok( + validateConfig({ ...config, features }).some((error) => error.includes("Expected exactly")), + ); +}); + +test("rejects duplicate Location public ownership", () => { + const sources = config.sources.map((source) => + source.feature === "Window" ? { ...source, public: [...source.public, "Location"] } : source, + ); + assert.ok(validateConfig({ ...config, sources }).includes("Duplicate public modules: Location")); +}); + test("recognizes the unavailable SafeFetch module diagnostic across line breaks", () => { assert.equal( isMissingSafeFetchDiagnostic("The module or file WebAPI.SafeFetch\ncan't be found."), diff --git a/src/window/History.res b/src/history/History.res similarity index 100% rename from src/window/History.res rename to src/history/History.res diff --git a/src/window/HistoryTypes.res b/src/history/HistoryTypes.res similarity index 100% rename from src/window/HistoryTypes.res rename to src/history/HistoryTypes.res diff --git a/src/window/Location.res b/src/location/Location.res similarity index 100% rename from src/window/Location.res rename to src/location/Location.res diff --git a/tests/DOMAPI/ImageData__test.res b/tests/DOMAPI/ImageData__test.res index 445049b3..38cbaa27 100644 --- a/tests/DOMAPI/ImageData__test.res +++ b/tests/DOMAPI/ImageData__test.res @@ -1,3 +1,3 @@ let imageData = ImageData.makeWithData(~data=Uint8ClampedArray.fromArray([]), ~sw=100, ~sh=100) -imageData.data->TypedArray.length->Console.log +(imageData.data :> TypedArray.t)->TypedArray.length->Console.log From c469e565ba27d5a92a9278defa64a7a5cdaa43a7 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Mon, 16 Nov 2026 13:42:36 -0500 Subject: [PATCH 2/7] style(webapi): apply ReScript alpha.7 formatting [Codex] --- src/core/DOM.res | 1 + src/crypto/Crypto.res | 1 + src/crypto/SubtleCrypto.res | 2 + src/cssom/StylePropertyMap.res | 1 + src/cssom/StyleSheet.res | 1 + src/device/GamepadTypes.res | 1 + src/device/GeolocationTypes.res | 1 + src/dom-nodes/Range.res | 1 + src/fetch/FormData.res | 1 + src/fetch/Request.res | 1 + src/fetch/Response.res | 1 + src/file/Blob.res | 2 + src/file/FileSystemDirectoryEntry.res | 1 + src/file/FileSystemDirectoryHandle.res | 1 + src/file/FileSystemFileHandle.res | 1 + src/file/FileSystemWritableFileStream.res | 1 + src/file/FileTypes.res | 1 + src/geometry/DOMMatrix.res | 1 + src/geometry/DOMPoint.res | 1 + src/geometry/DOMRect.res | 1 + src/media/MediaCapabilitiesTypes.res | 1 + src/media/MediaDevices.res | 3 + src/media/MediaMetadata.res | 1 + src/media/MediaSession.res | 2 + src/media/MediaStreamTrack.res | 3 + src/messaging/MessageEvent.res | 1 + src/messaging/Notification.res | 5 + src/navigator/Navigator.res | 8 ++ src/performance/PerformanceMark.res | 1 + src/storage/StorageTypes.res | 1 + tests/BindingByteTypes__test.res | 2 + tests/FetchAPI/FormData__test.res | 2 + tests/FetchAPI/Request__test.res | 1 + tests/FetchAPI/Response__test.res | 1 + tests/FetchAPI/SafeFetch__test.res | 112 +++++++++--------- tests/Fetch__test.res | 3 + .../IntersectionObserver__test.res | 9 +- .../MutationObserver__test.res | 7 +- .../AudioDestinationNode__.test.res | 3 + tests/browser/BindingContracts__test.res | 64 ++++++++-- 40 files changed, 180 insertions(+), 72 deletions(-) diff --git a/src/core/DOM.res b/src/core/DOM.res index 50a9a5cd..931d2252 100644 --- a/src/core/DOM.res +++ b/src/core/DOM.res @@ -37,6 +37,7 @@ type domStringList = { @editor.completeFrom(Window) type window = private {} + external window: window = "window" type autoFillBase = diff --git a/src/crypto/Crypto.res b/src/crypto/Crypto.res index 485e9bd6..f7c8ca7a 100644 --- a/src/crypto/Crypto.res +++ b/src/crypto/Crypto.res @@ -9,4 +9,5 @@ external getRandomValues: (WebCryptoTypes.crypto, 't) => 't = "getRandomValues" */ @send external randomUUID: WebCryptoTypes.crypto => string = "randomUUID" + type t = WebCryptoTypes.crypto diff --git a/src/crypto/SubtleCrypto.res b/src/crypto/SubtleCrypto.res index 9d8f29ad..3c613693 100644 --- a/src/crypto/SubtleCrypto.res +++ b/src/crypto/SubtleCrypto.res @@ -5,10 +5,12 @@ type keyUsage = WebCryptoTypes.keyUsage type keyFormat = WebCryptoTypes.keyFormat type algorithmIdentifier = WebCryptoTypes.algorithmIdentifier type algorithm = WebCryptoTypes.algorithm + type binaryKeyFormat = | @as("raw") Raw | @as("pkcs8") Pkcs8 | @as("spki") Spki + type jwkKeyFormat = | @as("jwk") Jwk type keyAlgorithm = WebCryptoTypes.keyAlgorithm type cryptoKey = WebCryptoTypes.cryptoKey diff --git a/src/cssom/StylePropertyMap.res b/src/cssom/StylePropertyMap.res index 7ec490bf..c87f65ac 100644 --- a/src/cssom/StylePropertyMap.res +++ b/src/cssom/StylePropertyMap.res @@ -7,6 +7,7 @@ type t = private { } external asStylePropertyMapReadOnly: t => StylePropertyMapReadOnly.t = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll) */ diff --git a/src/cssom/StyleSheet.res b/src/cssom/StyleSheet.res index a47fe7a5..4b1b4c70 100644 --- a/src/cssom/StyleSheet.res +++ b/src/cssom/StyleSheet.res @@ -127,6 +127,7 @@ type init = { external make: (~options: init=?) => cssStyleSheet = "CSSStyleSheet" external asStyleSheet: cssStyleSheet => t = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/insertRule) */ diff --git a/src/device/GamepadTypes.res b/src/device/GamepadTypes.res index 702ff322..84aeffbd 100644 --- a/src/device/GamepadTypes.res +++ b/src/device/GamepadTypes.res @@ -1,4 +1,5 @@ @@warning("-30") + type gamepadMappingType = | @as("standard") Standard | @as("xr-standard") XrStandard diff --git a/src/device/GeolocationTypes.res b/src/device/GeolocationTypes.res index d9149242..f7bb58a0 100644 --- a/src/device/GeolocationTypes.res +++ b/src/device/GeolocationTypes.res @@ -1,4 +1,5 @@ @@warning("-30") + /** An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. [See WebApiGeolocation on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation) diff --git a/src/dom-nodes/Range.res b/src/dom-nodes/Range.res index 5b6e2d17..71a4718c 100644 --- a/src/dom-nodes/Range.res +++ b/src/dom-nodes/Range.res @@ -14,6 +14,7 @@ type t = private { external make: unit => t = "Range" external asAbstractRange: t => AbstractRange.t = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Range/setStart) */ diff --git a/src/fetch/FormData.res b/src/fetch/FormData.res index 6920666c..c7388cf9 100644 --- a/src/fetch/FormData.res +++ b/src/fetch/FormData.res @@ -2,6 +2,7 @@ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData) */ type t = FetchTypes.formData = private {...FetchTypes.formData} + type formDataEntryValue = FormDataEntryValue.t /** diff --git a/src/fetch/Request.res b/src/fetch/Request.res index f51ad3fd..632e9904 100644 --- a/src/fetch/Request.res +++ b/src/fetch/Request.res @@ -2,6 +2,7 @@ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request) */ type t = FetchTypes.request = private {...FetchTypes.request} + type requestInit = FetchTypes.requestInit type bodyInit = BodyInit.t type headersInit = HeadersInit.t diff --git a/src/fetch/Response.res b/src/fetch/Response.res index aa76cfcb..981285bb 100644 --- a/src/fetch/Response.res +++ b/src/fetch/Response.res @@ -2,6 +2,7 @@ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Response) */ type t = FetchTypes.response = private {...FetchTypes.response} + type responseInit = FetchTypes.responseInit type bodyInit = BodyInit.t type headersInit = HeadersInit.t diff --git a/src/file/Blob.res b/src/file/Blob.res index a4142b94..80066357 100644 --- a/src/file/Blob.res +++ b/src/file/Blob.res @@ -2,6 +2,7 @@ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Blob) */ type t = FileTypes.blob = private {...FileTypes.blob} + type blobPart = FileTypes.blobPart type blobPropertyBag = FileTypes.blobPropertyBag @@ -14,6 +15,7 @@ module Impl = ( }, ) => { external asBlob: T.t => t = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ diff --git a/src/file/FileSystemDirectoryEntry.res b/src/file/FileSystemDirectoryEntry.res index fb943376..05601b1c 100644 --- a/src/file/FileSystemDirectoryEntry.res +++ b/src/file/FileSystemDirectoryEntry.res @@ -4,6 +4,7 @@ type t = BaseFileAndDirectoryEntries.fileSystemDirectoryEntry = private { external asFileSystemEntry: FileAndDirectoryEntriesTypes.fileSystemDirectoryEntry => FileAndDirectoryEntriesTypes.fileSystemEntry = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/getParent) */ diff --git a/src/file/FileSystemDirectoryHandle.res b/src/file/FileSystemDirectoryHandle.res index d1f6ac45..f92d8a46 100644 --- a/src/file/FileSystemDirectoryHandle.res +++ b/src/file/FileSystemDirectoryHandle.res @@ -2,6 +2,7 @@ type t = FileTypes.fileSystemDirectoryHandle = private {...FileTypes.fileSystemD external asFileSystemHandle: FileTypes.fileSystemDirectoryHandle => FileTypes.fileSystemHandle = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) */ diff --git a/src/file/FileSystemFileHandle.res b/src/file/FileSystemFileHandle.res index 3f9bd5b5..e020939d 100644 --- a/src/file/FileSystemFileHandle.res +++ b/src/file/FileSystemFileHandle.res @@ -2,6 +2,7 @@ type t = FileTypes.fileSystemFileHandle = private {...FileTypes.fileSystemFileHa external asFileSystemHandle: FileTypes.fileSystemFileHandle => FileTypes.fileSystemHandle = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) */ diff --git a/src/file/FileSystemWritableFileStream.res b/src/file/FileSystemWritableFileStream.res index 996002ee..ade0c341 100644 --- a/src/file/FileSystemWritableFileStream.res +++ b/src/file/FileSystemWritableFileStream.res @@ -4,6 +4,7 @@ type t = FileTypes.fileSystemWritableFileStream = private { external asWritableStream: FileTypes.fileSystemWritableFileStream => FileTypes.writableStream<'w> = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */ diff --git a/src/file/FileTypes.res b/src/file/FileTypes.res index d50b7cd1..0772f485 100644 --- a/src/file/FileTypes.res +++ b/src/file/FileTypes.res @@ -132,6 +132,7 @@ type fileSystemWritableFileStream = private { type blobPart = | String(string) | Blob(blob) + // | ArrayBuffer(ArrayBuffer.t) // | TypedArray(TypedArray.t) diff --git a/src/geometry/DOMMatrix.res b/src/geometry/DOMMatrix.res index f9ba24ee..a9f698a9 100644 --- a/src/geometry/DOMMatrix.res +++ b/src/geometry/DOMMatrix.res @@ -43,6 +43,7 @@ let matrix = DOMMatrix.fromArray([1., 0., 0., 1., 0., 0.]) external fromArray: array => DOM.domMatrix = "DOMMatrix" external asDOMMatrixReadOnly: DOM.domMatrix => DOM.domMatrixReadOnly = "%identity" + @scope("DOMMatrix") external fromMatrix: (~other: DOM.domMatrixInit=?) => DOM.domMatrixReadOnly = "fromMatrix" diff --git a/src/geometry/DOMPoint.res b/src/geometry/DOMPoint.res index 34225952..39fa97ef 100644 --- a/src/geometry/DOMPoint.res +++ b/src/geometry/DOMPoint.res @@ -7,6 +7,7 @@ type t = DOM.domPoint = private {...DOM.domPoint} external make: (~x: float=?, ~y: float=?, ~z: float=?, ~w: float=?) => DOM.domPoint = "DOMPoint" external asDOMPointReadOnly: DOM.domPoint => DOM.domPointReadOnly = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */ diff --git a/src/geometry/DOMRect.res b/src/geometry/DOMRect.res index 96246ce1..2d1974e2 100644 --- a/src/geometry/DOMRect.res +++ b/src/geometry/DOMRect.res @@ -8,6 +8,7 @@ external make: (~x: float=?, ~y: float=?, ~width: float=?, ~height: float=?) => "DOMRect" external asDOMRectReadOnly: DOM.domRect => DOM.domRectReadOnly = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */ diff --git a/src/media/MediaCapabilitiesTypes.res b/src/media/MediaCapabilitiesTypes.res index ebedb7ff..935e46a5 100644 --- a/src/media/MediaCapabilitiesTypes.res +++ b/src/media/MediaCapabilitiesTypes.res @@ -1,4 +1,5 @@ @@warning("-30") + type hdrMetadataType = | @as("smpteSt2086") SmpteSt2086 | @as("smpteSt2094-10") SmpteSt209410 diff --git a/src/media/MediaDevices.res b/src/media/MediaDevices.res index 648d964b..6135b48a 100644 --- a/src/media/MediaDevices.res +++ b/src/media/MediaDevices.res @@ -1,12 +1,15 @@ type t = MediaCaptureAndStreamsTypes.mediaDevices = private { ...MediaCaptureAndStreamsTypes.mediaDevices, } + type mediaTrackSupportedConstraints = MediaCaptureAndStreamsTypes.mediaTrackSupportedConstraints = { ...MediaCaptureAndStreamsTypes.mediaTrackSupportedConstraints, } + type mediaStreamConstraints = MediaCaptureAndStreamsTypes.mediaStreamConstraints = { ...MediaCaptureAndStreamsTypes.mediaStreamConstraints, } + type displayMediaStreamOptions = MediaCaptureAndStreamsTypes.displayMediaStreamOptions = { ...MediaCaptureAndStreamsTypes.displayMediaStreamOptions, } diff --git a/src/media/MediaMetadata.res b/src/media/MediaMetadata.res index 4bcd380d..42505373 100644 --- a/src/media/MediaMetadata.res +++ b/src/media/MediaMetadata.res @@ -1,4 +1,5 @@ type t = MediaSessionTypes.mediaMetadata = private {...MediaSessionTypes.mediaMetadata} + type mediaMetadataInit = MediaSessionTypes.mediaMetadataInit = { ...MediaSessionTypes.mediaMetadataInit, } diff --git a/src/media/MediaSession.res b/src/media/MediaSession.res index d9c6e7eb..a6b12c99 100644 --- a/src/media/MediaSession.res +++ b/src/media/MediaSession.res @@ -1,8 +1,10 @@ type t = MediaSessionTypes.mediaSession = private {...MediaSessionTypes.mediaSession} type mediaSessionAction = MediaSessionTypes.mediaSessionAction + type mediaPositionState = MediaSessionTypes.mediaPositionState = { ...MediaSessionTypes.mediaPositionState, } + type mediaSessionActionHandler = MediaSessionTypes.mediaSessionActionHandler /** diff --git a/src/media/MediaStreamTrack.res b/src/media/MediaStreamTrack.res index e31de28d..16ea9660 100644 --- a/src/media/MediaStreamTrack.res +++ b/src/media/MediaStreamTrack.res @@ -1,12 +1,15 @@ type t = MediaCaptureAndStreamsTypes.mediaStreamTrack = private { ...MediaCaptureAndStreamsTypes.mediaStreamTrack, } + type mediaTrackCapabilities = MediaCaptureAndStreamsTypes.mediaTrackCapabilities = { ...MediaCaptureAndStreamsTypes.mediaTrackCapabilities, } + type mediaTrackConstraints = MediaCaptureAndStreamsTypes.mediaTrackConstraints = { ...MediaCaptureAndStreamsTypes.mediaTrackConstraints, } + type mediaTrackSettings = MediaCaptureAndStreamsTypes.mediaTrackSettings = { ...MediaCaptureAndStreamsTypes.mediaTrackSettings, } diff --git a/src/messaging/MessageEvent.res b/src/messaging/MessageEvent.res index 53d5eacb..584b01ca 100644 --- a/src/messaging/MessageEvent.res +++ b/src/messaging/MessageEvent.res @@ -14,6 +14,7 @@ type t<'t> = messageEvent<'t> external make: (~type_: string, ~eventInitDict: messageEventInit<'t>=?) => t<'t> = "MessageEvent" external asEvent: t<'t> => event = "%identity" + /** Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/composedPath) diff --git a/src/messaging/Notification.res b/src/messaging/Notification.res index 7a193131..52693c0b 100644 --- a/src/messaging/Notification.res +++ b/src/messaging/Notification.res @@ -1,16 +1,21 @@ type t = NotificationTypes.notification = private {...NotificationTypes.notification} type notificationDirection = NotificationTypes.notificationDirection type notificationPermission = NotificationTypes.notificationPermission + type notificationAction = NotificationTypes.notificationAction = { ...NotificationTypes.notificationAction, } + type notificationOptions = NotificationTypes.notificationOptions = { ...NotificationTypes.notificationOptions, } + type getNotificationOptions = NotificationTypes.getNotificationOptions = { ...NotificationTypes.getNotificationOptions, } + type notificationPermissionCallback = NotificationTypes.notificationPermissionCallback + type notificationEvent = NotificationTypes.notificationEvent = { ...NotificationTypes.notificationEvent, } diff --git a/src/navigator/Navigator.res b/src/navigator/Navigator.res index ef26736c..e9a71196 100644 --- a/src/navigator/Navigator.res +++ b/src/navigator/Navigator.res @@ -64,34 +64,42 @@ type t = DOM.navigator [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/language) */ @get external language: t => string = "language" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/languages) */ @get external languages: t => array = "languages" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/onLine) */ @get external onLine: t => bool = "onLine" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/cookieEnabled) */ @get external cookieEnabled: t => bool = "cookieEnabled" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/pdfViewerEnabled) */ @get external pdfViewerEnabled: t => bool = "pdfViewerEnabled" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/hardwareConcurrency) */ @get external hardwareConcurrency: t => int = "hardwareConcurrency" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/storage) */ @get external storage: t => StorageTypes.storageManager = "storage" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/locks) */ @get external locks: t => WebLocksTypes.lockManager = "locks" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/webdriver) */ diff --git a/src/performance/PerformanceMark.res b/src/performance/PerformanceMark.res index fb20b47a..6af5e4a0 100644 --- a/src/performance/PerformanceMark.res +++ b/src/performance/PerformanceMark.res @@ -11,6 +11,7 @@ external make: ( external asPerformanceEntry: PerformanceTypes.performanceMark => PerformanceTypes.performanceEntry = "%identity" + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */ diff --git a/src/storage/StorageTypes.res b/src/storage/StorageTypes.res index 5556aae6..ebcaf1d5 100644 --- a/src/storage/StorageTypes.res +++ b/src/storage/StorageTypes.res @@ -1,4 +1,5 @@ @@warning("-30") + /** [See StorageManager on MDN](https://developer.mozilla.org/docs/Web/API/StorageManager) */ diff --git a/tests/BindingByteTypes__test.res b/tests/BindingByteTypes__test.res index bfc1eb1c..2ab2113e 100644 --- a/tests/BindingByteTypes__test.res +++ b/tests/BindingByteTypes__test.res @@ -8,10 +8,12 @@ let _analyserFloat: ( WebAudioTypes.analyserNode, Float32Array.t, ) => unit = AnalyserNode.getFloatTimeDomainData + let _analyserByte: ( WebAudioTypes.analyserNode, Uint8Array.t, ) => unit = AnalyserNode.getByteTimeDomainData + let _audioBuffer: (WebAudioTypes.audioBuffer, int) => Float32Array.t = AudioBuffer.getChannelData let _sign: SubtleCrypto.keyUsage = SubtleCrypto.signUsage diff --git a/tests/FetchAPI/FormData__test.res b/tests/FetchAPI/FormData__test.res index 180fa091..b1a99c0d 100644 --- a/tests/FetchAPI/FormData__test.res +++ b/tests/FetchAPI/FormData__test.res @@ -25,6 +25,7 @@ let _ = switch phoneEntry->Null.toOption { // Get all values for a field (useful for multi-select or multiple file inputs) let allImages: array = formData->FormData.getAll("images") + let _ = allImages->Array.forEach(entry => logEntry(~stringPrefix="String value: ", ~filePrefix="WebApiFile: ", entry) @@ -44,6 +45,7 @@ logEntry(~stringPrefix="Unexpected string entry: ", ~filePrefix="File entry: ", // Iterate over all entries in the FormData let entries: iterable<(string, EntryValue.t)> = formData->FormData.entries + let _ = entries ->Array.fromIterable diff --git a/tests/FetchAPI/Request__test.res b/tests/FetchAPI/Request__test.res index d790df70..d326619b 100644 --- a/tests/FetchAPI/Request__test.res +++ b/tests/FetchAPI/Request__test.res @@ -24,6 +24,7 @@ let formDataReq = Request.fromURL( "https://example.com/form", ~init={method: "POST", body: formDataBody->Nullable.make}, ) + let _formData: FormData.t = await formDataReq->Request.formData assert((await req2->Request.text) == "hello") diff --git a/tests/FetchAPI/Response__test.res b/tests/FetchAPI/Response__test.res index 0eb615d7..b7ed927b 100644 --- a/tests/FetchAPI/Response__test.res +++ b/tests/FetchAPI/Response__test.res @@ -19,4 +19,5 @@ let response6 = Response.fromReadableStream(stream) let _blob: Blob.t = await response1 ->Response.clone ->Response.blob + let _formData: FormData.t = await response5->Response.formData diff --git a/tests/FetchAPI/SafeFetch__test.res b/tests/FetchAPI/SafeFetch__test.res index f954f76e..e9ef0c8c 100644 --- a/tests/FetchAPI/SafeFetch__test.res +++ b/tests/FetchAPI/SafeFetch__test.res @@ -5,12 +5,14 @@ let isBytesABC = _bytes => %raw(`_bytes instanceof Uint8Array && _bytes.length === 3 && _bytes[0] === 65 && _bytes[2] === 67`) let okResponse = Response.fromString("ok", ~init={status: 200}) + switch okResponse->SafeFetch.checkOk { | Ok(response) => assert(isSame(response, okResponse)) | Error(#ResponseNotOk(_)) => assert(false) } let notOkResponse = Response.fromString("missing", ~init={status: 404}) + switch notOkResponse->SafeFetch.checkOk { | Error(#ResponseNotOk({response})) => assert(isSame(response, notOkResponse)) | Ok(_) => assert(false) @@ -31,6 +33,7 @@ switch await SafeFetch.fetch( } let customAbortSignal = AbortSignal.abort(~reason=JSON.Encode.string("cancelled")) + switch await SafeFetch.fetch( "https://example.com/aborted", ~init={signal: Nullable.make(customAbortSignal)}, @@ -54,22 +57,20 @@ globalThis.fetch = (_input, init) => { let request = Request.fromURL("https://example.com/request") switch await SafeFetch.fetch("https://example.com/ok", ~init={method: "POST"}) { -| Ok(response) => { - let expected: Response.t = %raw(`globalThis.__safeFetchResponse`) - let method: string = %raw(`globalThis.__safeFetchInit.method`) - assert(isSame(response, expected)) - assert(method == "POST") - } +| Ok(response) => + let expected: Response.t = %raw(`globalThis.__safeFetchResponse`) + let method: string = %raw(`globalThis.__safeFetchInit.method`) + assert(isSame(response, expected)) + assert(method == "POST") | Error(_) => assert(false) } switch await SafeFetch.fetchWithRequest(request, ~init={method: "POST"}) { -| Ok(response) => { - let expected: Response.t = %raw(`globalThis.__safeFetchResponse`) - let method: string = %raw(`globalThis.__safeFetchInit.method`) - assert(isSame(response, expected)) - assert(method == "POST") - } +| Ok(response) => + let expected: Response.t = %raw(`globalThis.__safeFetchResponse`) + let method: string = %raw(`globalThis.__safeFetchInit.method`) + assert(isSame(response, expected)) + assert(method == "POST") | Error(_) => assert(false) } @@ -82,22 +83,20 @@ globalThis.fetch = (_input, init) => { `) switch await SafeFetch.fetch("https://example.com/missing") { -| Error(#ResponseNotOk({response})) => { - let expected: Response.t = %raw(`globalThis.__safeFetchResponse`) - assert(isSame(response, expected)) - let initOmitted: bool = %raw(`globalThis.__safeFetchInit === undefined`) - assert(initOmitted) - } +| Error(#ResponseNotOk({response})) => + let expected: Response.t = %raw(`globalThis.__safeFetchResponse`) + assert(isSame(response, expected)) + let initOmitted: bool = %raw(`globalThis.__safeFetchInit === undefined`) + assert(initOmitted) | Error(#FetchRejected(_)) | Ok(_) => assert(false) } switch await SafeFetch.fetchWithRequest(request) { -| Error(#ResponseNotOk({response})) => { - let expected: Response.t = %raw(`globalThis.__safeFetchResponse`) - assert(isSame(response, expected)) - let initOmitted: bool = %raw(`globalThis.__safeFetchInit === undefined`) - assert(initOmitted) - } +| Error(#ResponseNotOk({response})) => + let expected: Response.t = %raw(`globalThis.__safeFetchResponse`) + assert(isSame(response, expected)) + let initOmitted: bool = %raw(`globalThis.__safeFetchInit === undefined`) + assert(initOmitted) | Error(#FetchRejected(_)) | Ok(_) => assert(false) } @@ -148,24 +147,25 @@ switch await SafeFetch.fetch("https://example.com/synchronous") { } let textResponse = Response.fromString("hello") + switch await textResponse->SafeFetch.text { -| Ok({response, body}) => { - assert(isSame(response, textResponse)) - assert(body == "hello") - } +| Ok({response, body}) => + assert(isSame(response, textResponse)) + assert(body == "hello") | Error(_) => assert(false) } let jsonResponse = Response.fromString(`{"name":"Ada"}`) + switch await jsonResponse->SafeFetch.json { -| Ok({response, body}) => { - let _json: JSON.t = body - assert(isSame(response, jsonResponse)) - } +| Ok({response, body}) => + let _json: JSON.t = body + assert(isSame(response, jsonResponse)) | Error(_) => assert(false) } let malformedResponse = Response.fromString("not json") + switch await malformedResponse->SafeFetch.json { | Error(#BodyReadRejected({response, cause: _})) => assert(isSame(response, malformedResponse)) | Ok(_) => assert(false) @@ -173,17 +173,18 @@ switch await malformedResponse->SafeFetch.json { let consumedResponse = Response.fromString("once") let _ = await consumedResponse->Response.text + switch await consumedResponse->SafeFetch.text { | Error(#BodyReadRejected({response, cause: _})) => assert(isSame(response, consumedResponse)) | Ok(_) => assert(false) } let errorBodyResponse = Response.fromString("details", ~init={status: 500}) + switch await errorBodyResponse->SafeFetch.text { -| Ok({response, body}) => { - assert(isSame(response, errorBodyResponse)) - assert(body == "details") - } +| Ok({response, body}) => + assert(isSame(response, errorBodyResponse)) + assert(body == "details") | Error(_) => assert(false) } @@ -191,24 +192,27 @@ let arrayBufferResult: result< SafeFetch.response, [> SafeFetch.bodyError], > = await Response.fromString("buffer")->SafeFetch.arrayBuffer + assert(arrayBufferResult->Result.isOk) let blobResult: result< SafeFetch.response, [> SafeFetch.bodyError], > = await Response.fromString("blob")->SafeFetch.blob + assert(blobResult->Result.isOk) let bytesResponse = Response.fromString("ABC") + let bytesResult: result< SafeFetch.response, [> SafeFetch.bodyError], > = await bytesResponse->SafeFetch.bytes + switch bytesResult { -| Ok({response, body}) => { - assert(isSame(response, bytesResponse)) - assert(isBytesABC(body)) - } +| Ok({response, body}) => + assert(isSame(response, bytesResponse)) + assert(isBytesABC(body)) | Error(_) => assert(false) } @@ -218,10 +222,12 @@ let formDataResponse = Response.fromString( headers: HeadersInit.fromDict(dict{"Content-Type": "application/x-www-form-urlencoded"}), }, ) + let formDataResult: result< SafeFetch.response, [> SafeFetch.bodyError], > = await formDataResponse->SafeFetch.formData + assert(formDataResult->Result.isOk) type user = {name: string} @@ -272,10 +278,9 @@ globalThis.fetch = () => Promise.resolve(globalThis.__safeFetchResponse) `) switch await loadUser("https://example.com/user", mustNotDecode) { -| Error(#ResponseNotOk({response})) => { - assert(isSame(response, %raw(`globalThis.__safeFetchResponse`))) - assert(!response.bodyUsed) - } +| Error(#ResponseNotOk({response})) => + assert(isSame(response, %raw(`globalThis.__safeFetchResponse`))) + assert(!response.bodyUsed) | Error(#FetchRejected(_) | #BodyReadRejected(_)) | Ok(_) => assert(false) } @@ -285,12 +290,11 @@ globalThis.fetch = () => Promise.resolve(globalThis.__safeFetchResponse) `) switch await loadUser("https://example.com/user", mustNotDecode) { -| Error(#BodyReadRejected({response, cause})) => { - assert(isSame(response, %raw(`globalThis.__safeFetchResponse`))) - switch cause->JsExn.fromException { - | Some(rawCause) => assert(JsExn.name(rawCause) == Some("SyntaxError")) - | None => assert(false) - } +| Error(#BodyReadRejected({response, cause})) => + assert(isSame(response, %raw(`globalThis.__safeFetchResponse`))) + switch cause->JsExn.fromException { + | Some(rawCause) => assert(JsExn.name(rawCause) == Some("SyntaxError")) + | None => assert(false) } | Error(#FetchRejected(_) | #ResponseNotOk(_)) | Ok(_) => assert(false) } @@ -317,10 +321,10 @@ switch await Response.fromString("checked")->readCheckedText { } let uncheckedResponse = Response.fromString("not read", ~init={status: 500}) + switch await uncheckedResponse->readCheckedText { -| Error(#ResponseNotOk({response})) => { - assert(isSame(response, uncheckedResponse)) - assert(!response.bodyUsed) - } +| Error(#ResponseNotOk({response})) => + assert(isSame(response, uncheckedResponse)) + assert(!response.bodyUsed) | Error(#BodyReadRejected(_)) | Ok(_) => assert(false) } diff --git a/tests/Fetch__test.res b/tests/Fetch__test.res index 66f4cf1f..e2642388 100644 --- a/tests/Fetch__test.res +++ b/tests/Fetch__test.res @@ -36,6 +36,7 @@ let registrationResult = await Window.current ->Window.navigator ->Navigator.serviceWorker ->ServiceWorkerContainer.register("/sw.js") + let subscription = await registrationResult.pushManager->PushManager.subscribe( ~options={ userVisibleOnly: true, @@ -44,8 +45,10 @@ let subscription = await registrationResult.pushManager->PushManager.subscribe( ) let pushSubscriptionJSON = subscription->PushSubscription.toJSON + let (auth, p256dh) = switch pushSubscriptionJSON.keys { | None => ("?", "?") | Some(keys) => (keys.auth, keys.p256dh) } + Console.log(`For subscription ${subscription.endpoint}, auth is ${auth} and p256dh is ${p256dh}`) diff --git a/tests/IntersectionObserverAPI/IntersectionObserver__test.res b/tests/IntersectionObserverAPI/IntersectionObserver__test.res index 2604d255..b4756ba8 100644 --- a/tests/IntersectionObserverAPI/IntersectionObserver__test.res +++ b/tests/IntersectionObserverAPI/IntersectionObserver__test.res @@ -27,14 +27,15 @@ switch observer2.root->Null.toOption { } | None => Console.log("Null") } + let rootMargin2 = observer2.rootMargin let targetElement = DomGlobal.document->Document.querySelector("#targetElement")->Null.toOption + switch targetElement { -| Some(e) => { - observer2->IObserver.observe(e) - observer2->IObserver.unobserve(e) - } +| Some(e) => + observer2->IObserver.observe(e) + observer2->IObserver.unobserve(e) | _ => Console.log("Target element not found.") } diff --git a/tests/MutationObserverAPI/MutationObserver__test.res b/tests/MutationObserverAPI/MutationObserver__test.res index aa6c636e..e342f6a2 100644 --- a/tests/MutationObserverAPI/MutationObserver__test.res +++ b/tests/MutationObserverAPI/MutationObserver__test.res @@ -3,10 +3,9 @@ module MObserver = MutationObserver let observer = MObserver.make((mutations, obs) => { let button = DomGlobal.document->Document.querySelector("button") switch button->Null.toOption { - | Some(button) => { - Console.log(button) - obs->MObserver.disconnect - } + | Some(button) => + Console.log(button) + obs->MObserver.disconnect | None => () } Console.log(mutations) diff --git a/tests/WebAudioAPI/AudioDestinationNode__.test.res b/tests/WebAudioAPI/AudioDestinationNode__.test.res index 85246252..0063ed74 100644 --- a/tests/WebAudioAPI/AudioDestinationNode__.test.res +++ b/tests/WebAudioAPI/AudioDestinationNode__.test.res @@ -10,13 +10,16 @@ let osc = OscillatorNode.make( frequency: 440.0, }, ) + let gain = GainNode.make( ~context, ~options={ gain: 0.3, }, ) + let _ = gain->GainNode.connect(~destinationNode) + let _ = osc ->OscillatorNode.asAudioScheduledSourceNode diff --git a/tests/browser/BindingContracts__test.res b/tests/browser/BindingContracts__test.res index abc7d9b6..6803e803 100644 --- a/tests/browser/BindingContracts__test.res +++ b/tests/browser/BindingContracts__test.res @@ -23,25 +23,34 @@ let withResolver = (_run: (unit => unit) => unit): promise => let hasResizeCallbackArgs = (_entries, _observer) => %raw(`_entries.length > 0 && _observer instanceof ResizeObserver`) + let createResizeSignals = () => %raw(`({count: 0, resolvers: []})`) + let waitForResizeSignal = (_signals: unknown): promise => %raw(`new Promise(resolve => _signals.resolvers.push(resolve))`) + let resolveNextResizeSignal = (_signals: unknown): unit => %raw(`_signals.resolvers.shift()()`) let incrementResizeCount = (_signals: unknown): int => %raw(`++_signals.count`) + let setSize = (_target: DOMTree.element, _pixels: int): unit => %raw(`(_target.style.width = _pixels + "px", _target.style.height = _pixels + "px")`) let isNull = _value => %raw(`_value === null`) let isUndefined = _value => %raw(`_value === undefined`) + let isKnownNotificationPermission = _permission => %raw(`_permission === "default" || _permission === "denied" || _permission === "granted"`) + let containsABCByteChunk = _result => %raw(`_result.value instanceof Uint8Array && _result.value.length === 3 && _result.value[0] === 65 && _result.value[1] === 66 && _result.value[2] === 67`) + let appendChild = (_parent, _child) => %raw(`_parent.appendChild(_child)`) let appendToDocument = _target => %raw(`document.body.appendChild(_target)`) + let onSuccess = (_request, _callback) => %raw(`_request.addEventListener("success", _callback, {once: true})`) + let releaseLock = () => %raw(`globalThis.__releaseBindingLock()`) let isUint8ArrayWithABC = _bytes => @@ -62,6 +71,7 @@ let requestBytes = await Request.fromURL( "https://example.invalid/", ~init={method: "POST", body: Nullable.make(BodyInit.fromString("ABC"))}, )->Request.bytes + assert(isUint8ArrayWithABC(requestBytes)) let emptyStateRequest = Request.fromURL("https://example.invalid/") @@ -75,13 +85,16 @@ let byteStreamReader = byteStream->ReadableStream.getReader let firstChunk = await byteStreamReader->readByteStreamChunk assert(containsABCByteChunk(firstChunk)) await byteStreamReader->cancelByteStreamReader + let responseFromByteStream = Response.fromReadableStream( Blob.make(~blobParts=[String("ABC")])->Blob.stream, ) + let responseStreamBytes = await responseFromByteStream->Response.bytes assert(isUint8ArrayWithABC(responseStreamBytes)) let audio: HTMLAudioElement.t = %raw(`document.createElement("audio")`) + assert(audio->HTMLAudioElement.canPlayType("application/x-webapi-unsupported") == DomHTMLMediaElement.Empty) @@ -89,16 +102,15 @@ let permission = Notification.permission assert(isKnownNotificationPermission(permission)) switch Document.createElement(document, "canvas")->HTMLCanvasElement.classify { -| Some(canvas) => { - canvas.width = 0 - canvas.height = 0 - await withResolver(resolve => - canvas->HTMLCanvasElement.toBlob(~callback=_blob => { - assert(isNull(_blob)) - resolve() - }) - ) - } +| Some(canvas) => + canvas.width = 0 + canvas.height = 0 + await withResolver(resolve => + canvas->HTMLCanvasElement.toBlob(~callback=_blob => { + assert(isNull(_blob)) + resolve() + }) + ) | None => assert(false) } @@ -111,11 +123,13 @@ external customElements: DOM.customElementRegistry = "customElements" external bindingContractsConstructor: DOM.customElementConstructor = "BindingContractsElement" let customElementName = "webapi-binding-contracts" + CustomElementRegistry.define( customElements, ~name=customElementName, ~constructor=bindingContractsConstructor, ) + let customElement = Document.createElement(document, customElementName) assert(%raw(`customElement instanceof globalThis.BindingContractsElement`)) @@ -140,10 +154,12 @@ let htmlParent: HTMLDivElement.t = %raw(`document.createElement("div")`) htmlParent->HTMLDivElement.setAttribute(~qualifiedName="class", ~value="binding-contracts-html") assert(htmlParent.className == "binding-contracts-html") let htmlChild: HTMLSpanElement.t = %raw(`document.createElement("span")`) + htmlChild->HTMLSpanElement.setAttribute( ~qualifiedName="class", ~value="binding-contracts-html-child", ) + appendChild(htmlParent, htmlChild) let broadHtmlResult = htmlParent->HTMLDivElement.querySelector(".binding-contracts-html-child") assert(%raw(`broadHtmlResult !== null && typeof broadHtmlResult.className === "string"`)) @@ -153,12 +169,14 @@ let audioContext = OfflineAudioContext.fromChannelCountLengthAndSampleRate( ~length=128, ~sampleRate=44100., ) + let audioBuffer = audioContext->OfflineAudioContext.createBuffer( ~numberOfChannels=1, ~length=128, ~sampleRate=44100., ) + let sourceChannel: Float32Array.t = %raw(`new Float32Array([0.5, -0.25])`) audioBuffer->AudioBuffer.copyToChannel(~source=sourceChannel, ~channelNumber=0) let channelData = audioBuffer->AudioBuffer.getChannelData(0) @@ -180,27 +198,33 @@ let filter = audioContext->OfflineAudioContext.createBiquadFilter let frequencies: Float32Array.t = %raw(`new Float32Array([440, 880])`) let magnitudes: Float32Array.t = %raw(`new Float32Array([-123, -123])`) let phases: Float32Array.t = %raw(`new Float32Array([-456, -456])`) + filter->BiquadFilterNode.getFrequencyResponse( ~frequencyHz=frequencies, ~magResponse=magnitudes, ~phaseResponse=phases, ) + assert(%raw(`magnitudes instanceof Float32Array && phases instanceof Float32Array && magnitudes.length === 2 && phases.length === 2 && magnitudes[0] !== -123 && phases[0] !== -456 && !Number.isNaN(magnitudes[0])`)) let iirFilter = IIRFilterNode.make( ~context=audioContext->OfflineAudioContext.asBaseAudioContext, ~options={feedforward: [1.], feedback: [1.]}, ) + let iirMagnitudes: Float32Array.t = %raw(`new Float32Array([-123, -123])`) let iirPhases: Float32Array.t = %raw(`new Float32Array([-456, -456])`) + iirFilter->IIRFilterNode.getFrequencyResponse( ~frequencyHz=frequencies, ~magResponse=iirMagnitudes, ~phaseResponse=iirPhases, ) + assert(%raw(`iirMagnitudes instanceof Float32Array && iirMagnitudes[0] !== -123 && !Number.isNaN(iirMagnitudes[0]) && iirPhases instanceof Float32Array && iirPhases[0] !== -456`)) let deleteRequest = IDBFactory.deleteDatabase(indexedDB, "binding-contracts-regression") + await withResolver(resolve => onSuccess(deleteRequest, () => { assert(isUndefined(deleteRequest.result)) @@ -209,6 +233,7 @@ await withResolver(resolve => ) let lockManager = navigator->Navigator.locks + await withResolver(resolve => { let _heldRequest = lockManager->LockManager.request( ~name="binding-contracts-contended-lock", @@ -219,6 +244,7 @@ await withResolver(resolve => { }, ) }) + let _contendedRequest = await lockManager->LockManager.request2( ~name="binding-contracts-contended-lock", ~options={ifAvailable: true}, @@ -227,6 +253,7 @@ let _contendedRequest = await lockManager->LockManager.request2( %raw(`Promise.resolve(null)`) }, ) + releaseLock() let matrixValues = Float32Array.fromArray([2., 0., 0., 3., 4., 5.]) @@ -241,6 +268,7 @@ let resizeSignals = createResizeSignals() let initialResize = waitForResizeSignal(resizeSignals) let resizedAgain = waitForResizeSignal(resizeSignals) setSize(target, 10) + let observer = ResizeObserver.make((entries, observer) => { assert(hasResizeCallbackArgs(entries, observer)) if incrementResizeCount(resizeSignals) == 2 { @@ -248,6 +276,7 @@ let observer = ResizeObserver.make((entries, observer) => { } resolveNextResizeSignal(resizeSignals) }) + observer->ResizeObserver.observe(~target) await initialResize setSize(target, 20) @@ -255,32 +284,39 @@ await resizedAgain target->Element.remove let subtle = crypto.subtle + let digest = await subtle->SubtleCrypto.digest( ~algorithm=SubtleCrypto.algorithmObject({name: "SHA-256"}), ~data=Uint8Array.fromArray([65, 66, 67])->SubtleCrypto.binaryDataFromUint8Array, ) + let digestBytes: Uint8Array.t = %raw(`new Uint8Array(digest)`) assert(%raw(`digest.byteLength === 32 && digestBytes instanceof Uint8Array && digestBytes.length === 32 && digestBytes.buffer === digest`)) let data = Uint8Array.fromArray([65, 66, 67])->SubtleCrypto.binaryDataFromUint8Array + let hmacKey = await subtle->SubtleCrypto.generateKeySymmetric( ~hash=SubtleCrypto.algorithmObject({name: "SHA-256"}), ~length=256, ~extractable=true, ~keyUsages=[SubtleCrypto.signUsage, SubtleCrypto.verifyUsage], ) + let _publicHmacKey: SubtleCrypto.cryptoKey = hmacKey + let signature = await subtle->SubtleCrypto.sign( ~algorithm=SubtleCrypto.algorithmObject({name: "HMAC"}), ~key=hmacKey, ~data, ) + let verified = await subtle->SubtleCrypto.verify( ~algorithm=SubtleCrypto.algorithmObject({name: "HMAC"}), ~key=hmacKey, ~signature=SubtleCrypto.binaryDataFromArrayBuffer(signature), ~data, ) + assert(verified) let rawKey = await subtle->SubtleCrypto.exportKeyBinary(~format=SubtleCrypto.Raw, ~key=hmacKey) @@ -292,12 +328,15 @@ let keyPair = await subtle->SubtleCrypto.generateEcdsaKeyPair( ~extractable=true, ~keyUsages=[SubtleCrypto.signUsage, SubtleCrypto.verifyUsage], ) + let _publicKeyPair: SubtleCrypto.cryptoKeyPair = keyPair + let pairSignature = await subtle->SubtleCrypto.sign( ~algorithm=SubtleCrypto.algorithmObject({name: "ECDSA", hash: {name: "SHA-256"}}), ~key=keyPair.privateKey, ~data, ) + assert(await subtle->SubtleCrypto.verify( ~algorithm=SubtleCrypto.algorithmObject({name: "ECDSA", hash: {name: "SHA-256"}}), ~key=keyPair.publicKey, @@ -324,6 +363,7 @@ let aesKeyData = 14, 15, ])->SubtleCrypto.binaryDataFromUint8Array + let aesKey = await subtle->SubtleCrypto.importKey( ~format=SubtleCrypto.rawKeyFormat, ~keyData=aesKeyData, @@ -331,6 +371,7 @@ let aesKey = await subtle->SubtleCrypto.importKey( ~extractable=true, ~keyUsages=[SubtleCrypto.encryptUsage, SubtleCrypto.decryptUsage], ) + let aesIv = Uint8Array.fromArray([ 1, @@ -346,12 +387,15 @@ let aesIv = 11, 12, ])->SubtleCrypto.binaryDataFromUint8Array + let aesAlgorithm = SubtleCrypto.algorithmObject({name: "AES-GCM", iv: aesIv, tagLength: 128}) let ciphertext = await subtle->SubtleCrypto.encrypt(~algorithm=aesAlgorithm, ~key=aesKey, ~data) + let plaintext = await subtle->SubtleCrypto.decrypt( ~algorithm=aesAlgorithm, ~key=aesKey, ~data=SubtleCrypto.binaryDataFromArrayBuffer(ciphertext), ) + let plaintextBytes: Uint8Array.t = %raw(`new Uint8Array(plaintext)`) assert(isUint8ArrayWithABC(plaintextBytes)) From 625b8687db9f30cd4510584e641bb5718361610f Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Mon, 16 Nov 2026 13:47:05 -0500 Subject: [PATCH 3/7] fix(docs): handle ReScript alpha.7 signature metadata [Codex] --- docs/components/value.astro | 9 ++-- docs/signatureTypes.js | 22 +++++++++ scripts/check-doc-type-links.test.mjs | 64 +++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 6 deletions(-) create mode 100644 docs/signatureTypes.js diff --git a/docs/components/value.astro b/docs/components/value.astro index 25c7b64a..d0c3fda5 100644 --- a/docs/components/value.astro +++ b/docs/components/value.astro @@ -1,12 +1,9 @@ --- import { Code } from "@astrojs/starlight/components"; import SignatureItem from "./signatureItem.astro"; +import { getLinkedSignature } from "../signatureTypes.js"; const { value, typesInOwnModule } = Astro.props; -const details = value.detail?.details || null; - -function showValue(detail) { - return detail?.kind === "signature" && detail.details?.parameters?.length > 0; -} +const details = getLinkedSignature(value.detail); --- @@ -15,7 +12,7 @@ function showValue(detail) {
{ - showValue(value.detail) && ( + details && (

Parameters

{details.parameters.map((p) => ( diff --git a/docs/signatureTypes.js b/docs/signatureTypes.js new file mode 100644 index 00000000..457c8071 --- /dev/null +++ b/docs/signatureTypes.js @@ -0,0 +1,22 @@ +const isLinkedType = (type) => + typeof type?.path === "string" && + Array.isArray(type.genericTypeParameters ?? []) && + (type.genericTypeParameters ?? []).every(isLinkedType); + +// The full compiler-rendered signature is always shown by value.astro. +// Only add the linked summary when every type can be represented faithfully. +export const getLinkedSignature = (detail) => { + if ( + detail?.kind !== "signature" || + !Array.isArray(detail.details?.parameters) || + detail.details.parameters.length === 0 + ) { + return null; + } + + const parameters = detail.details.parameters.map((parameter) => parameter?.type); + const returnType = detail.details.returnType; + return parameters.every(isLinkedType) && isLinkedType(returnType) + ? { parameters, returnType } + : null; +}; diff --git a/scripts/check-doc-type-links.test.mjs b/scripts/check-doc-type-links.test.mjs index 2321ec5f..834bab2e 100644 --- a/scripts/check-doc-type-links.test.mjs +++ b/scripts/check-doc-type-links.test.mjs @@ -2,6 +2,70 @@ import assert from "node:assert/strict"; import test from "node:test"; import { createPublicTypeTargets, parsePublicTypeAliases } from "../docs/typeLinks.js"; +import { getLinkedSignature } from "../docs/signatureTypes.js"; + +test("unwraps compiler parameter metadata before linking signature types", () => { + const controller = { + kind: "constructor", + path: "WebAPI.DOM.abortController", + genericTypeParameters: [], + }; + const json = { kind: "constructor", path: "JSON.t", genericTypeParameters: [] }; + const unit = { kind: "constructor", path: "unit", genericTypeParameters: [] }; + assert.deepEqual( + getLinkedSignature({ + kind: "signature", + details: { + parameters: [ + { optional: false, type: controller }, + { label: "reason", optional: true, type: json }, + ], + returnType: unit, + }, + }), + { parameters: [controller, json], returnType: unit }, + ); +}); + +test("keeps recursively linkable generic return types", () => { + const type = { kind: "constructor", path: "WebAPI.Element.t", genericTypeParameters: [] }; + const result = { kind: "constructor", path: "option", genericTypeParameters: [type] }; + assert.deepEqual( + getLinkedSignature({ + kind: "signature", + details: { parameters: [{ type }], returnType: result }, + }), + { parameters: [type], returnType: result }, + ); +}); + +test("falls back to the full signature for unsupported or absent type detail", () => { + const unit = { path: "unit", genericTypeParameters: [] }; + for (const type of [ + { kind: "function" }, + { path: "array", genericTypeParameters: [{ kind: "variable" }] }, + ]) { + assert.equal( + getLinkedSignature({ + kind: "signature", + details: { parameters: [{ type }], returnType: unit }, + }), + null, + ); + assert.equal( + getLinkedSignature({ + kind: "signature", + details: { parameters: [{ type: unit }], returnType: type }, + }), + null, + ); + } + assert.equal(getLinkedSignature(undefined), null); + assert.equal( + getLinkedSignature({ kind: "signature", details: { parameters: [], returnType: unit } }), + null, + ); +}); test("parses public aliases to backing module types, including generic aliases", () => { assert.deepEqual( From acf8d6ce07341d5c6c98027b43ac5aaaaf68fac8 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Mon, 16 Nov 2026 16:30:38 -0500 Subject: [PATCH 4/7] refactor(webapi): move shared element types into core DOM [Codex] --- docs/content/docs/api-surface.mdx | 11 + scripts/check-features.mjs | 34 +- scripts/consumer-dom-core.res | 10 + scripts/consumer-dom-element-disabled.res | 1 + scripts/consumer-dom-reexports.res | 79 + .../DOMCollectionCannotBeConstructed.res | 1 + .../negative/DOMSlotModeIsDistinct.res | 1 + .../DOMStyleMapCannotBeConstructed.res | 1 + scripts/negative-fixtures.json | 18 + src/core/DOM.res | 3531 +++++++++++++++++ src/cssom/CSSStyleDeclaration.res | 1703 +------- src/cssom/MediaList.res | 11 +- src/cssom/StylePropertyMap.res | 4 +- src/cssom/StylePropertyMapReadOnly.res | 7 +- src/cssom/StyleSheet.res | 117 +- src/cssom/StyleSheetList.res | 7 +- src/dom-nodes/DOMTree.res | 1644 +------- src/dom-nodes/HTMLCollection.res | 8 +- src/dom-platform/DOMStringMap.res | 2 +- 19 files changed, 3715 insertions(+), 3475 deletions(-) create mode 100644 scripts/consumer-dom-core.res create mode 100644 scripts/consumer-dom-element-disabled.res create mode 100644 scripts/consumer-dom-reexports.res create mode 100644 scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res create mode 100644 scripts/fixtures/negative/DOMSlotModeIsDistinct.res create mode 100644 scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res diff --git a/docs/content/docs/api-surface.mdx b/docs/content/docs/api-surface.mdx index 48a0f51d..884189c6 100644 --- a/docs/content/docs/api-surface.mdx +++ b/docs/content/docs/api-surface.mdx @@ -434,6 +434,17 @@ let redirect = WebAPI.Response.redirect(~url="/login", ~status=302) ## DOM +`WebAPI.DOM` also exposes the core DOM record types for type-only consumers. For example, +`WebAPI.DOM.element` includes recursive node fields and `WebAPI.DOM.htmlElement` exposes +its CSS declaration style field without enabling DOM operation modules. Enable +`WebAPI.DOMNodes` when you need node/element methods from modules such as `WebAPI.Element`; +that bundle opts into those operations explicitly. + +```ReScript +let parentNode = (element: WebAPI.DOM.element) => element.parentNode +let style = (element: WebAPI.DOM.htmlElement) => element.style +``` + DOM values are operated on through public interface modules. ```ReScript diff --git a/scripts/check-features.mjs b/scripts/check-features.mjs index 4b2940d0..363d7a72 100644 --- a/scripts/check-features.mjs +++ b/scripts/check-features.mjs @@ -294,10 +294,15 @@ const prepareConsumer = (directory, features, fixture) => { ); }; +export const isMissingModuleDiagnostic = (output, moduleName) => + new RegExp(`The module or file (?:WebAPI\\.)?${escapeRegExp(moduleName)} can't be found\\.`).test( + output.replace(/\s+/g, " "), + ); + export const isMissingSafeFetchDiagnostic = (output) => - /The module or file (?:WebAPI\.)?SafeFetch can't be found\./.test(output.replace(/\s+/g, " ")); + isMissingModuleDiagnostic(output, "SafeFetch"); -const runConsumerCheck = ({ name, features, fixture, shouldCompile }) => { +const runConsumerCheck = ({ name, features, fixture, shouldCompile, missingModule }) => { const directory = mkdtempSync(path.join(os.tmpdir(), "webapi-feature-consumer-")); try { prepareConsumer(directory, features, fixture); @@ -308,12 +313,14 @@ const runConsumerCheck = ({ name, features, fixture, shouldCompile }) => { const output = `${result.stdout ?? ""}\n${result.stderr ?? ""}`; const passed = shouldCompile ? result.status === 0 - : result.status !== null && result.status !== 0 && isMissingSafeFetchDiagnostic(output); + : result.status !== null && + result.status !== 0 && + isMissingModuleDiagnostic(output, missingModule ?? "SafeFetch"); return passed ? { _tag: "Success" } : { _tag: "Failure", - message: `${name} did not ${shouldCompile ? "compile" : "reject the unavailable SafeFetch module"}.\n${result.error?.message ?? ""}\n${output.trim()}`, + message: `${name} did not ${shouldCompile ? "compile" : `reject the unavailable ${missingModule ?? "SafeFetch"} module`}.\n${result.error?.message ?? ""}\n${output.trim()}`, }; } finally { rmSync(directory, { recursive: true, force: true }); @@ -380,6 +387,25 @@ if (process.argv[1] !== undefined && path.resolve(process.argv[1]) === scriptPat fixture: "consumer-safe-fetch-disabled.res", shouldCompile: false, }, + { + name: "Core DOM type consumer", + features: ["WebAPI.DOM"], + fixture: "consumer-dom-core.res", + shouldCompile: true, + }, + { + name: "DOM feature does not expose Element operations", + features: ["WebAPI.DOM"], + fixture: "consumer-dom-element-disabled.res", + shouldCompile: false, + missingModule: "Element", + }, + { + name: "DOM moved type re-exports", + features: ["WebAPI.DOMNodes", "WebAPI.HTML", "WebAPI.Window", "WebAPI.CSSOM"], + fixture: "consumer-dom-reexports.res", + shouldCompile: true, + }, ]) { const result = runConsumerCheck(consumer); if (result._tag === "Failure") { diff --git a/scripts/consumer-dom-core.res b/scripts/consumer-dom-core.res new file mode 100644 index 00000000..7deb16a5 --- /dev/null +++ b/scripts/consumer-dom-core.res @@ -0,0 +1,10 @@ +let elementIdentity: WebAPI.DOM.element => WebAPI.DOM.element = value => value +let parentNode = (element: WebAPI.DOM.element) => element.parentNode +let childNodes = (element: WebAPI.DOM.element) => element.childNodes +let style = (element: WebAPI.DOM.htmlElement) => element.style + +// Preserve inference of pre-existing constructors, not only annotated use. +let inferredManual = WebAPI.DOM.Manual +let legacyManual: WebAPI.DOM.slotAssignmentMode = inferredManual +let inferredNamed = WebAPI.DOM.Named +let legacyNamed: WebAPI.DOM.slotAssignmentMode = inferredNamed diff --git a/scripts/consumer-dom-element-disabled.res b/scripts/consumer-dom-element-disabled.res new file mode 100644 index 00000000..8ec214b7 --- /dev/null +++ b/scripts/consumer-dom-element-disabled.res @@ -0,0 +1 @@ +let invalid = WebAPI.Element.asNode diff --git a/scripts/consumer-dom-reexports.res b/scripts/consumer-dom-reexports.res new file mode 100644 index 00000000..54a1f4c8 --- /dev/null +++ b/scripts/consumer-dom-reexports.res @@ -0,0 +1,79 @@ +let domElement: WebAPI.DOM.element => WebAPI.Element.t = value => value +let elementDom: WebAPI.Element.t => WebAPI.DOM.element = value => value +let node: WebAPI.DOMTree.node => WebAPI.DOM.node = value => value +let nodeBack: WebAPI.DOM.node => WebAPI.DOMTree.node = value => value +let html: WebAPI.DOM.htmlElement => WebAPI.DOMTree.htmlElement = value => value +let htmlBack: WebAPI.DOMTree.htmlElement => WebAPI.DOM.htmlElement = value => value +let collection: WebAPI.DOM.htmlCollection<'item> => WebAPI.HTMLCollection.t<'item> = value => value + +let collectionBack: WebAPI.HTMLCollection.t<'item> => WebAPI.DOM.htmlCollection<'item> = value => + value + +let declaration: WebAPI.DOM.cssStyleDeclaration => WebAPI.CSSStyleDeclaration.t = value => value +let declarationBack: WebAPI.CSSStyleDeclaration.t => WebAPI.DOM.cssStyleDeclaration = value => value +let styleMap: WebAPI.DOM.stylePropertyMap => WebAPI.StylePropertyMap.t = value => value +let styleMapBack: WebAPI.StylePropertyMap.t => WebAPI.DOM.stylePropertyMap = value => value +let mode: WebAPI.DOMTree.slotAssignmentMode = WebAPI.DOMTree.Manual + +let toPublic0: WebAPI.DOM.node => WebAPI.Node.t = value => value +let toCore0: WebAPI.Node.t => WebAPI.DOM.node = value => value + +let toPublic1: WebAPI.DOM.documentFragment => WebAPI.DocumentFragment.t = value => value +let toCore1: WebAPI.DocumentFragment.t => WebAPI.DOM.documentFragment = value => value + +let toPublic2: WebAPI.DOM.shadowRoot => WebAPI.ShadowRoot.t = value => value +let toCore2: WebAPI.ShadowRoot.t => WebAPI.DOM.shadowRoot = value => value + +let toPublic3: WebAPI.DOM.htmlElement => WebAPI.HTMLElement.t = value => value +let toCore3: WebAPI.HTMLElement.t => WebAPI.DOM.htmlElement = value => value + +let toPublic4: WebAPI.DOM.htmlFormElement => WebAPI.HTMLFormElement.t = value => value +let toCore4: WebAPI.HTMLFormElement.t => WebAPI.DOM.htmlFormElement = value => value + +let toPublic5: WebAPI.DOM.htmlFormControlsCollection => WebAPI.HTMLFormControlsCollection.t = value => + value + +let toCore5: WebAPI.HTMLFormControlsCollection.t => WebAPI.DOM.htmlFormControlsCollection = value => + value + +let toPublic6: WebAPI.DOM.htmlSlotElement => WebAPI.HTMLSlotElement.t = value => value +let toCore6: WebAPI.HTMLSlotElement.t => WebAPI.DOM.htmlSlotElement = value => value + +let toPublic7: WebAPI.DOM.elementInternals => WebAPI.ElementInternals.t = value => value +let toCore7: WebAPI.ElementInternals.t => WebAPI.DOM.elementInternals = value => value + +let toPublic8: WebAPI.DOM.styleSheet => WebAPI.StyleSheet.t = value => value +let toCore8: WebAPI.StyleSheet.t => WebAPI.DOM.styleSheet = value => value + +let toPublic9: WebAPI.DOM.cssStyleSheet => WebAPI.StyleSheet.cssStyleSheet = value => value +let toCore9: WebAPI.StyleSheet.cssStyleSheet => WebAPI.DOM.cssStyleSheet = value => value + +let toPublic10: WebAPI.DOM.cssRule => WebAPI.StyleSheet.cssRule = value => value +let toCore10: WebAPI.StyleSheet.cssRule => WebAPI.DOM.cssRule = value => value + +let toPublic11: WebAPI.DOM.cssRuleList => WebAPI.CSSRuleList.t = value => value +let toCore11: WebAPI.CSSRuleList.t => WebAPI.DOM.cssRuleList = value => value + +let toPublic12: WebAPI.DOM.stylePropertyMapReadOnly => WebAPI.StylePropertyMapReadOnly.t = value => + value + +let toCore12: WebAPI.StylePropertyMapReadOnly.t => WebAPI.DOM.stylePropertyMapReadOnly = value => + value + +let toPublic13: WebAPI.DOM.styleSheetList => WebAPI.StyleSheetList.t = value => value +let toCore13: WebAPI.StyleSheetList.t => WebAPI.DOM.styleSheetList = value => value + +let toPublic14: WebAPI.DOM.mediaList => WebAPI.MediaList.t = value => value +let toCore14: WebAPI.MediaList.t => WebAPI.DOM.mediaList = value => value + +let treeMode = WebAPI.DOMTree.Manual +let preservedTreeMode: WebAPI.DOMTree.slotAssignmentMode = treeMode + +let adoptedSheets = (root: WebAPI.DOM.shadowRoot): array => + root.adoptedStyleSheets + +let styleParent = (style: WebAPI.CSSStyleDeclaration.t): Null.t => + style.parentRule + +let dataset = (element: WebAPI.HTMLElement.t): WebAPI.DOM.domStringMap => element.dataset +let mutateStyle = (style: WebAPI.CSSStyleDeclaration.t, color: string) => style.color = color diff --git a/scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res b/scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res new file mode 100644 index 00000000..5227f501 --- /dev/null +++ b/scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res @@ -0,0 +1 @@ +let invalid: WebAPI.DOM.htmlCollection = {length: 0} diff --git a/scripts/fixtures/negative/DOMSlotModeIsDistinct.res b/scripts/fixtures/negative/DOMSlotModeIsDistinct.res new file mode 100644 index 00000000..090cc07a --- /dev/null +++ b/scripts/fixtures/negative/DOMSlotModeIsDistinct.res @@ -0,0 +1 @@ +let invalid: WebAPI.DOM.slotAssignmentMode = WebAPI.DOMTree.Manual diff --git a/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res b/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res new file mode 100644 index 00000000..3f6b6c8a --- /dev/null +++ b/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res @@ -0,0 +1 @@ +let invalid: WebAPI.DOM.stylePropertyMap = {size: 0} diff --git a/scripts/negative-fixtures.json b/scripts/negative-fixtures.json index 98b868fb..77779693 100644 --- a/scripts/negative-fixtures.json +++ b/scripts/negative-fixtures.json @@ -142,5 +142,23 @@ "fixture": "scripts/fixtures/negative/WebCryptoExportKeyFormatHasUnknownResult.res", "features": ["WebAPI.Crypto"], "expectedDiagnostic": "This has type:" + }, + { + "name": "DOM and DOMTree slot assignment modes stay distinct", + "fixture": "scripts/fixtures/negative/DOMSlotModeIsDistinct.res", + "features": ["WebAPI.DOMNodes"], + "expectedDiagnostic": "belongs to the variant type WebAPI.DOMTree.slotAssignmentMode" + }, + { + "name": "private DOM collection cannot be constructed", + "fixture": "scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res", + "features": ["WebAPI.DOM"], + "expectedDiagnostic": "Cannot create values of the" + }, + { + "name": "private DOM style map cannot be constructed", + "fixture": "scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res", + "features": ["WebAPI.DOM"], + "expectedDiagnostic": "Cannot create values of the" } ] diff --git a/src/core/DOM.res b/src/core/DOM.res index 931d2252..6f457b67 100644 --- a/src/core/DOM.res +++ b/src/core/DOM.res @@ -607,6 +607,10 @@ type namedNodeMap = private { type structuredSerializeOptions = {mutable transfer?: array>} +type domTreeSlotAssignmentMode = + | @as("manual") Manual + | @as("named") Named + type slotAssignmentMode = | @as("manual") Manual | @as("named") Named @@ -1027,3 +1031,3530 @@ type imageBitmapSource type customElementConstructor type timeoutId + +// Shared DOM representations; operations stay in their owning API modules. + +/** +A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list. +[See HTMLCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection) +*/ +@editor.completeFrom(HTMLCollection) +type htmlCollection<'item> = private { + /** + Sets or retrieves the number of objects in a collection. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/length) + */ + length: int, +} + +/** +Used by the dataset HTML attribute to represent data for custom attributes added to elements. +[See DOMStringMap on MDN](https://developer.mozilla.org/docs/Web/API/DOMStringMap) +*/ +@editor.completeFrom(DOMStringMap) +type domStringMap = private {} + +/** +[See StylePropertyMapReadOnly on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) +*/ +@editor.completeFrom(StylePropertyMapReadOnly) +type stylePropertyMapReadOnly = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size) + */ + size: int, +} + +/** +[See StylePropertyMap on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap) +*/ +@editor.completeFrom(StylePropertyMap) +type stylePropertyMap = private { + ...stylePropertyMapReadOnly, +} + +@editor.completeFrom(MediaList) +type mediaList = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/mediaText) + */ + mutable mediaText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/length) + */ + length: int, +} + +/** +A list of StyleSheet. +[See StyleSheetList on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList) +*/ +@editor.completeFrom(StyleSheetList) +type styleSheetList = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/length) + */ + length: int, +} + +/** +A single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. +[See StyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet) +*/ +@editor.completeFrom(StyleSheet) +type rec styleSheet = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) + */ + @as("type") + type_: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) + */ + href: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) + */ + ownerNode: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) + */ + parentStyleSheet: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) + */ + title: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) + */ + media: mediaList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) + */ + mutable disabled: bool, +} + +/** +A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. +[See CSSStyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(CSSStyleSheet) and cssStyleSheet = { + // Base properties from StyleSheet + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) + */ + @as("type") + type_: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) + */ + href: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) + */ + ownerNode: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) + */ + parentStyleSheet: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) + */ + title: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) + */ + media: mediaList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) + */ + mutable disabled: bool, + // End base properties from StyleSheet + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/ownerRule) + */ + ownerRule: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/cssRules) + */ + cssRules: cssRuleList, +} + +/** +A single CSS rule. There are several types of rules, listed in the Type constants section below. +[See CSSRule on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule) +*/ +and cssRule = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/cssText) + */ + mutable cssText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentRule) + */ + parentRule: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentStyleSheet) + */ + parentStyleSheet: Null.t, +} + +/** +A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. +[See CSSRuleList on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList) +*/ +@editor.completeFrom(CSSRuleList) and cssRuleList = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/length) + */ + length: int, +} + +@editor.completeFrom(CSSStyleDeclaration) +type cssStyleDeclaration = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText) + */ + mutable cssText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/length) + */ + length: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule) + */ + parentRule: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cx) + */ + mutable cx: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cy) + */ + mutable cy: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/r) + */ + mutable r: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/rx) + */ + mutable rx: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ry) + */ + mutable ry: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/x) + */ + mutable x: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/y) + */ + mutable y: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/vector-effect) + */ + mutable vectorEffect: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/d) + */ + mutable d: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-anchor) + */ + mutable textAnchor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill) + */ + mutable fill: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke) + */ + mutable stroke: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-start) + */ + mutable markerStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-mid) + */ + mutable markerMid: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-end) + */ + mutable markerEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker) + */ + mutable marker: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/paint-order) + */ + mutable paintOrder: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-interpolation) + */ + mutable colorInterpolation: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-rendering) + */ + mutable shapeRendering: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-rendering) + */ + mutable textRendering: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/pointer-events) + */ + mutable pointerEvents: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stop-color) + */ + mutable stopColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stop-opacity) + */ + mutable stopOpacity: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color) + */ + mutable webkitTextFillColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color) + */ + mutable webkitTextStrokeColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width) + */ + mutable webkitTextStrokeWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke) + */ + mutable webkitTextStroke: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/touch-action) + */ + mutable touchAction: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/position-area) + */ + mutable positionArea: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/top) + */ + mutable top: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/left) + */ + mutable left: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/right) + */ + mutable right: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/bottom) + */ + mutable bottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-self) + */ + mutable justifySelf: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-self) + */ + mutable alignSelf: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-items) + */ + mutable justifyItems: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-items) + */ + mutable alignItems: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/width) + */ + mutable width: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/height) + */ + mutable height: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-width) + */ + mutable minWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-height) + */ + mutable minHeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-width) + */ + mutable maxWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-height) + */ + mutable maxHeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-top) + */ + mutable marginTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-left) + */ + mutable marginLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-right) + */ + mutable marginRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-bottom) + */ + mutable marginBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-duration) + */ + mutable animationDuration: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-composition) + */ + mutable animationComposition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-name) + */ + mutable animationName: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-timing-function) + */ + mutable animationTimingFunction: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count) + */ + mutable animationIterationCount: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-direction) + */ + mutable animationDirection: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-play-state) + */ + mutable animationPlayState: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-delay) + */ + mutable animationDelay: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode) + */ + mutable animationFillMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation) + */ + mutable animation: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/all) + */ + mutable all: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container-type) + */ + mutable containerType: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container-name) + */ + mutable containerName: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container) + */ + mutable container: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain) + */ + mutable contain: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/content-visibility) + */ + mutable contentVisibility: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-family) + */ + mutable fontFamily: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-weight) + */ + mutable fontWeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-style) + */ + mutable fontStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-size) + */ + mutable fontSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-size-adjust) + */ + mutable fontSizeAdjust: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font) + */ + mutable font: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight) + */ + mutable fontSynthesisWeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style) + */ + mutable fontSynthesisStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps) + */ + mutable fontSynthesisSmallCaps: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis) + */ + mutable fontSynthesis: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-kerning) + */ + mutable fontKerning: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures) + */ + mutable fontVariantLigatures: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-position) + */ + mutable fontVariantPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-caps) + */ + mutable fontVariantCaps: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric) + */ + mutable fontVariantNumeric: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates) + */ + mutable fontVariantAlternates: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian) + */ + mutable fontVariantEastAsian: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant) + */ + mutable fontVariant: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-feature-settings) + */ + mutable fontFeatureSettings: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing) + */ + mutable fontOpticalSizing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variation-settings) + */ + mutable fontVariationSettings: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-palette) + */ + mutable fontPalette: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-stretch) + */ + mutable fontStretch: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/object-fit) + */ + mutable objectFit: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clip-path) + */ + mutable clipPath: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clip-rule) + */ + mutable clipRule: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-image) + */ + mutable maskImage: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-mode) + */ + mutable maskMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-repeat) + */ + mutable maskRepeat: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-position) + */ + mutable maskPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-clip) + */ + mutable maskClip: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-origin) + */ + mutable maskOrigin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-size) + */ + mutable maskSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-composite) + */ + mutable maskComposite: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask) + */ + mutable mask: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-type) + */ + mutable maskType: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-behavior) + */ + mutable transitionBehavior: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-property) + */ + mutable transitionProperty: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-duration) + */ + mutable transitionDuration: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-timing-function) + */ + mutable transitionTimingFunction: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-delay) + */ + mutable transitionDelay: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition) + */ + mutable transition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/view-transition-name) + */ + mutable viewTransitionName: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/zoom) + */ + mutable zoom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/filter) + */ + mutable filter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-interpolation-filters) + */ + mutable colorInterpolationFilters: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/display) + */ + mutable display: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-transform) + */ + mutable textTransform: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/math-style) + */ + mutable mathStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/math-depth) + */ + mutable mathDepth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/z-index) + */ + mutable zIndex: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-before) + */ + mutable pageBreakBefore: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-after) + */ + mutable pageBreakAfter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-inside) + */ + mutable pageBreakInside: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode) + */ + mutable mixBlendMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/isolation) + */ + mutable isolation: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-blend-mode) + */ + mutable backgroundBlendMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-content) + */ + mutable alignContent: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-content) + */ + mutable justifyContent: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-content) + */ + mutable placeContent: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-self) + */ + mutable placeSelf: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-items) + */ + mutable placeItems: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/row-gap) + */ + mutable rowGap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-gap) + */ + mutable columnGap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/gap) + */ + mutable gap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-repeat) + */ + mutable backgroundRepeat: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position) + */ + mutable backgroundPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position-x) + */ + mutable backgroundPositionX: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position-y) + */ + mutable backgroundPositionY: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-clip) + */ + mutable backgroundClip: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-color) + */ + mutable backgroundColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-image) + */ + mutable backgroundImage: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-attachment) + */ + mutable backgroundAttachment: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-origin) + */ + mutable backgroundOrigin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-size) + */ + mutable backgroundSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background) + */ + mutable background: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-style) + */ + mutable borderStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-width) + */ + mutable borderWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border) + */ + mutable border: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-source) + */ + mutable borderImageSource: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-slice) + */ + mutable borderImageSlice: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-width) + */ + mutable borderImageWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-outset) + */ + mutable borderImageOutset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-repeat) + */ + mutable borderImageRepeat: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image) + */ + mutable borderImage: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-color) + */ + mutable borderTopColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-color) + */ + mutable borderRightColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-color) + */ + mutable borderBottomColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-color) + */ + mutable borderLeftColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-color) + */ + mutable borderBlockStartColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-color) + */ + mutable borderBlockEndColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color) + */ + mutable borderInlineStartColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color) + */ + mutable borderInlineEndColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-color) + */ + mutable borderColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-color) + */ + mutable borderBlockColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-color) + */ + mutable borderInlineColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-style) + */ + mutable borderTopStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-style) + */ + mutable borderRightStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-style) + */ + mutable borderBottomStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-style) + */ + mutable borderLeftStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-style) + */ + mutable borderBlockStartStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-style) + */ + mutable borderBlockEndStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style) + */ + mutable borderInlineStartStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style) + */ + mutable borderInlineEndStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-style) + */ + mutable borderBlockStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-style) + */ + mutable borderInlineStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-width) + */ + mutable borderTopWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-width) + */ + mutable borderRightWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-width) + */ + mutable borderBottomWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-width) + */ + mutable borderLeftWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-width) + */ + mutable borderBlockStartWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-width) + */ + mutable borderBlockEndWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width) + */ + mutable borderInlineStartWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width) + */ + mutable borderInlineEndWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-width) + */ + mutable borderBlockWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-width) + */ + mutable borderInlineWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top) + */ + mutable borderTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right) + */ + mutable borderRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom) + */ + mutable borderBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left) + */ + mutable borderLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start) + */ + mutable borderBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end) + */ + mutable borderBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start) + */ + mutable borderInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end) + */ + mutable borderInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block) + */ + mutable borderBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline) + */ + mutable borderInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius) + */ + mutable borderTopLeftRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius) + */ + mutable borderTopRightRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) + */ + mutable borderBottomRightRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius) + */ + mutable borderBottomLeftRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius) + */ + mutable borderStartStartRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) + */ + mutable borderStartEndRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius) + */ + mutable borderEndStartRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) + */ + mutable borderEndEndRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-radius) + */ + mutable borderRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-shadow) + */ + mutable boxShadow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin) + */ + mutable margin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-top) + */ + mutable paddingTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-right) + */ + mutable paddingRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-bottom) + */ + mutable paddingBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-left) + */ + mutable paddingLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding) + */ + mutable padding: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-before) + */ + mutable breakBefore: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-after) + */ + mutable breakAfter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-inside) + */ + mutable breakInside: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/orphans) + */ + mutable orphans: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/widows) + */ + mutable widows: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-decoration-break) + */ + mutable boxDecorationBreak: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-scheme) + */ + mutable colorScheme: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust) + */ + mutable forcedColorAdjust: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/print-color-adjust) + */ + mutable printColorAdjust: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color) + */ + mutable color: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/opacity) + */ + mutable opacity: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/content) + */ + mutable content: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/quotes) + */ + mutable quotes: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/order) + */ + mutable order: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/visibility) + */ + mutable visibility: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-direction) + */ + mutable flexDirection: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-wrap) + */ + mutable flexWrap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-flow) + */ + mutable flexFlow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex) + */ + mutable flex: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-grow) + */ + mutable flexGrow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-shrink) + */ + mutable flexShrink: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-basis) + */ + mutable flexBasis: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/position) + */ + mutable position: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/float) + */ + mutable float: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-columns) + */ + mutable gridTemplateColumns: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-rows) + */ + mutable gridTemplateRows: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow) + */ + mutable gridAutoFlow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-areas) + */ + mutable gridTemplateAreas: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template) + */ + mutable gridTemplate: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns) + */ + mutable gridAutoColumns: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows) + */ + mutable gridAutoRows: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid) + */ + mutable grid: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row-start) + */ + mutable gridRowStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column-start) + */ + mutable gridColumnStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row-end) + */ + mutable gridRowEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column-end) + */ + mutable gridColumnEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row) + */ + mutable gridRow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column) + */ + mutable gridColumn: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-area) + */ + mutable gridArea: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/object-position) + */ + mutable objectPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/image-rendering) + */ + mutable imageRendering: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/dominant-baseline) + */ + mutable dominantBaseline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/vertical-align) + */ + mutable verticalAlign: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/line-height) + */ + mutable lineHeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-image) + */ + mutable listStyleImage: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-type) + */ + mutable listStyleType: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-position) + */ + mutable listStylePosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style) + */ + mutable listStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-reset) + */ + mutable counterReset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-increment) + */ + mutable counterIncrement: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-set) + */ + mutable counterSet: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/block-size) + */ + mutable blockSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inline-size) + */ + mutable inlineSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-block-size) + */ + mutable minBlockSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-inline-size) + */ + mutable minInlineSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-block-size) + */ + mutable maxBlockSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-inline-size) + */ + mutable maxInlineSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block-start) + */ + mutable marginBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block-end) + */ + mutable marginBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start) + */ + mutable marginInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) + */ + mutable marginInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block) + */ + mutable marginBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline) + */ + mutable marginInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block-start) + */ + mutable paddingBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block-end) + */ + mutable paddingBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start) + */ + mutable paddingInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) + */ + mutable paddingInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block) + */ + mutable paddingBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline) + */ + mutable paddingInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-span) + */ + mutable columnSpan: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-width) + */ + mutable columnWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-count) + */ + mutable columnCount: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/columns) + */ + mutable columns: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-color) + */ + mutable columnRuleColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-style) + */ + mutable columnRuleStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-width) + */ + mutable columnRuleWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule) + */ + mutable columnRule: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-fill) + */ + mutable columnFill: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin) + */ + mutable overflowClipMargin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-overflow) + */ + mutable textOverflow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-x) + */ + mutable overflowX: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-y) + */ + mutable overflowY: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow) + */ + mutable overflow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-behavior) + */ + mutable scrollBehavior: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter) + */ + mutable scrollbarGutter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior) + */ + mutable overscrollBehavior: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x) + */ + mutable overscrollBehaviorX: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y) + */ + mutable overscrollBehaviorY: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline) + */ + mutable overscrollBehaviorInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block) + */ + mutable overscrollBehaviorBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clear) + */ + mutable clear: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page) + */ + mutable page: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block-start) + */ + mutable insetBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline-start) + */ + mutable insetInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block-end) + */ + mutable insetBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline-end) + */ + mutable insetInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block) + */ + mutable insetBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline) + */ + mutable insetInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset) + */ + mutable inset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ruby-position) + */ + mutable rubyPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ruby-align) + */ + mutable rubyAlign: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-anchor) + */ + mutable overflowAnchor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) + */ + mutable scrollSnapType: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding) + */ + mutable scrollPadding: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin) + */ + mutable scrollMargin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align) + */ + mutable scrollSnapAlign: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop) + */ + mutable scrollSnapStop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top) + */ + mutable scrollPaddingTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right) + */ + mutable scrollPaddingRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom) + */ + mutable scrollPaddingBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left) + */ + mutable scrollPaddingLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start) + */ + mutable scrollPaddingInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start) + */ + mutable scrollPaddingBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end) + */ + mutable scrollPaddingInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end) + */ + mutable scrollPaddingBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block) + */ + mutable scrollPaddingBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline) + */ + mutable scrollPaddingInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top) + */ + mutable scrollMarginTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right) + */ + mutable scrollMarginRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom) + */ + mutable scrollMarginBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left) + */ + mutable scrollMarginLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start) + */ + mutable scrollMarginBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start) + */ + mutable scrollMarginInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end) + */ + mutable scrollMarginBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end) + */ + mutable scrollMarginInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block) + */ + mutable scrollMarginBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline) + */ + mutable scrollMarginInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-color) + */ + mutable scrollbarColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-width) + */ + mutable scrollbarWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-outside) + */ + mutable shapeOutside: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold) + */ + mutable shapeImageThreshold: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-margin) + */ + mutable shapeMargin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/aspect-ratio) + */ + mutable aspectRatio: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width) + */ + mutable containIntrinsicWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height) + */ + mutable containIntrinsicHeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size) + */ + mutable containIntrinsicBlockSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size) + */ + mutable containIntrinsicInlineSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size) + */ + mutable containIntrinsicSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-sizing) + */ + mutable boxSizing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/table-layout) + */ + mutable tableLayout: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-collapse) + */ + mutable borderCollapse: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-spacing) + */ + mutable borderSpacing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/caption-side) + */ + mutable captionSide: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/empty-cells) + */ + mutable emptyCells: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/white-space) + */ + mutable whiteSpace: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/white-space-collapse) + */ + mutable whiteSpaceCollapse: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/tab-size) + */ + mutable tabSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap-mode) + */ + mutable textWrapMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap-style) + */ + mutable textWrapStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap) + */ + mutable textWrap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/word-break) + */ + mutable wordBreak: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/line-break) + */ + mutable lineBreak: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/hyphens) + */ + mutable hyphens: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/hyphenate-character) + */ + mutable hyphenateCharacter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-wrap) + */ + mutable overflowWrap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-align) + */ + mutable textAlign: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-align-last) + */ + mutable textAlignLast: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/word-spacing) + */ + mutable wordSpacing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) + */ + mutable letterSpacing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-indent) + */ + mutable textIndent: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-line) + */ + mutable textDecorationLine: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-style) + */ + mutable textDecorationStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-color) + */ + mutable textDecorationColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness) + */ + mutable textDecorationThickness: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration) + */ + mutable textDecoration: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-underline-position) + */ + mutable textUnderlinePosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-underline-offset) + */ + mutable textUnderlineOffset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink) + */ + mutable textDecorationSkipInk: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style) + */ + mutable textEmphasisStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color) + */ + mutable textEmphasisColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis) + */ + mutable textEmphasis: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position) + */ + mutable textEmphasisPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-shadow) + */ + mutable textShadow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/translate) + */ + mutable translate: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/rotate) + */ + mutable rotate: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scale) + */ + mutable scale: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-style) + */ + mutable transformStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/perspective) + */ + mutable perspective: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/perspective-origin) + */ + mutable perspectiveOrigin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/backface-visibility) + */ + mutable backfaceVisibility: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform) + */ + mutable transform: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-origin) + */ + mutable transformOrigin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-box) + */ + mutable transformBox: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline) + */ + mutable outline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-width) + */ + mutable outlineWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-style) + */ + mutable outlineStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-color) + */ + mutable outlineColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-offset) + */ + mutable outlineOffset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/resize) + */ + mutable resize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cursor) + */ + mutable cursor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/caret-color) + */ + mutable caretColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/user-select) + */ + mutable userSelect: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/accent-color) + */ + mutable accentColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/appearance) + */ + mutable appearance: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/will-change) + */ + mutable willChange: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/direction) + */ + mutable direction: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/unicode-bidi) + */ + mutable unicodeBidi: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/writing-mode) + */ + mutable writingMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-orientation) + */ + mutable textOrientation: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-combine-upright) + */ + mutable textCombineUpright: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill-rule) + */ + mutable fillRule: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill-opacity) + */ + mutable fillOpacity: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-width) + */ + mutable strokeWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-linecap) + */ + mutable strokeLinecap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin) + */ + mutable strokeLinejoin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit) + */ + mutable strokeMiterlimit: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray) + */ + mutable strokeDasharray: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset) + */ + mutable strokeDashoffset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-opacity) + */ + mutable strokeOpacity: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/backdrop-filter) + */ + mutable backdropFilter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-path) + */ + mutable offsetPath: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-distance) + */ + mutable offsetDistance: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-position) + */ + mutable offsetPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-anchor) + */ + mutable offsetAnchor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-rotate) + */ + mutable offsetRotate: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset) + */ + mutable offset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) + */ + mutable cssFloat: string, +} + +type shadowRootMode = + | @as("closed") Closed + | @as("open") Open + +type customStateSet = {} + +/** +Node is an interface from which a number of WebApiDOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way. +[See Node on MDN](https://developer.mozilla.org/docs/Web/API/Node) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(Node) +type rec node = { + ...eventTarget, + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, +} + +/** +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. +[See Element on MDN](https://developer.mozilla.org/docs/Web/API/Element) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(Element) and element = { + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + Returns the namespace. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) + */ + namespaceURI: Null.t, + /** + Returns the namespace prefix. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) + */ + prefix: Null.t, + /** + Returns the local name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) + */ + localName: string, + /** + Returns the HTML-uppercased qualified name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) + */ + tagName: string, + /** + Returns the value of element's id content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) + */ + mutable id: string, + /** + Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) + */ + classList: domTokenList, + /** + Returns the value of element's slot content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) + */ + mutable slot: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) + */ + attributes: namedNodeMap, + /** + Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) + */ + shadowRoot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) + */ + part: domTokenList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) + */ + mutable scrollTop: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) + */ + mutable scrollLeft: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) + */ + scrollWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) + */ + scrollHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) + */ + clientTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) + */ + clientLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) + */ + clientWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) + */ + clientHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) + */ + currentCSSZoom: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) + */ + @throws(JsExn) + mutable outerHTML: string, + /** + Returns the child elements. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children) + */ + children: htmlCollection, + /** + Returns the first child that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild) + */ + firstElementChild: Null.t, + /** + Returns the last child that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/lastElementChild) + */ + lastElementChild: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/childElementCount) + */ + childElementCount: int, + /** + Returns the first preceding sibling that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/previousElementSibling) + */ + previousElementSibling: Null.t, + /** + Returns the first following sibling that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/nextElementSibling) + */ + nextElementSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/assignedSlot) + */ + assignedSlot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaAtomic) + */ + mutable ariaAtomic: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaAutoComplete) + */ + mutable ariaAutoComplete: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleLabel) + */ + mutable ariaBrailleLabel: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleRoleDescription) + */ + mutable ariaBrailleRoleDescription: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBusy) + */ + mutable ariaBusy: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaChecked) + */ + mutable ariaChecked: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColCount) + */ + mutable ariaColCount: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndex) + */ + mutable ariaColIndex: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndexText) + */ + mutable ariaColIndexText: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) + */ + mutable ariaColSpan: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) + */ + mutable ariaCurrent: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaDescription) + */ + mutable ariaDescription: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaDisabled) + */ + mutable ariaDisabled: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaExpanded) + */ + mutable ariaExpanded: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaHasPopup) + */ + mutable ariaHasPopup: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaHidden) + */ + mutable ariaHidden: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaKeyShortcuts) + */ + mutable ariaKeyShortcuts: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLabel) + */ + mutable ariaLabel: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLevel) + */ + mutable ariaLevel: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLive) + */ + mutable ariaLive: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaModal) + */ + mutable ariaModal: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiLine) + */ + mutable ariaMultiLine: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiSelectable) + */ + mutable ariaMultiSelectable: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaOrientation) + */ + mutable ariaOrientation: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPlaceholder) + */ + mutable ariaPlaceholder: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPosInSet) + */ + mutable ariaPosInSet: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPressed) + */ + mutable ariaPressed: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaReadOnly) + */ + mutable ariaReadOnly: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRequired) + */ + mutable ariaRequired: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRoleDescription) + */ + mutable ariaRoleDescription: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowCount) + */ + mutable ariaRowCount: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndex) + */ + mutable ariaRowIndex: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndexText) + */ + mutable ariaRowIndexText: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowSpan) + */ + mutable ariaRowSpan: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSelected) + */ + mutable ariaSelected: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSetSize) + */ + mutable ariaSetSize: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSort) + */ + mutable ariaSort: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMax) + */ + mutable ariaValueMax: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMin) + */ + mutable ariaValueMin: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueNow) + */ + mutable ariaValueNow: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueText) + */ + mutable ariaValueText: Null.t, +} + +/** +A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. +[See DocumentFragment on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(DocumentFragment) and documentFragment = { + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + Returns the child elements. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children) + */ + children: htmlCollection, + /** + Returns the first child that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild) + */ + firstElementChild: Null.t, + /** + Returns the last child that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/lastElementChild) + */ + lastElementChild: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/childElementCount) + */ + childElementCount: int, +} + +/** +[See ShadowRoot on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(ShadowRoot) and shadowRoot = { + // Base properties from DocumentFragment + // End base properties from DocumentFragment + + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/mode) + */ + mode: shadowRootMode, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/delegatesFocus) + */ + delegatesFocus: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/slotAssignment) + */ + slotAssignment: domTreeSlotAssignmentMode, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/clonable) + */ + clonable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/serializable) + */ + serializable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/host) + */ + host: element, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/styleSheets) + */ + styleSheets: styleSheetList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/adoptedStyleSheets) + */ + @throws(JsExn) + mutable adoptedStyleSheets: array, + /** + Returns document's fullscreen element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/fullscreenElement) + */ + fullscreenElement: Null.t, + /** + Returns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document. + +For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document. + +Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/activeElement) + */ + activeElement: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/pictureInPictureElement) + */ + pictureInPictureElement: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/pointerLockElement) + */ + pointerLockElement: Null.t, +} + +/** +Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. +[See HTMLElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(HTMLElement) and htmlElement = { + // Base properties from Element + /** + Returns the namespace. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) + */ + namespaceURI: Null.t, + /** + Returns the namespace prefix. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) + */ + prefix: Null.t, + /** + Returns the local name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) + */ + localName: string, + /** + Returns the HTML-uppercased qualified name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) + */ + tagName: string, + /** + Returns the value of element's id content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) + */ + mutable id: string, + /** + Returns the value of element's class content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) + */ + mutable className: string, + /** + Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) + */ + classList: domTokenList, + /** + Returns the value of element's slot content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) + */ + mutable slot: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) + */ + attributes: namedNodeMap, + /** + Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) + */ + shadowRoot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) + */ + part: domTokenList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) + */ + mutable scrollTop: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) + */ + mutable scrollLeft: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) + */ + scrollWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) + */ + scrollHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) + */ + clientTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) + */ + clientLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) + */ + clientWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) + */ + clientHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) + */ + currentCSSZoom: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) + */ + @throws(JsExn) + mutable outerHTML: string, + // End base properties from Element + + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) + */ + mutable title: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) + */ + mutable lang: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) + */ + mutable translate: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) + */ + mutable dir: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) + */ + mutable inert: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) + */ + mutable accessKey: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) + */ + accessKeyLabel: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) + */ + mutable draggable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) + */ + mutable spellcheck: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) + */ + mutable autocapitalize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) + */ + mutable innerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) + */ + mutable outerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) + */ + mutable popover: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) + */ + offsetParent: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) + */ + offsetTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) + */ + offsetLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) + */ + offsetWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) + */ + offsetHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) + */ + style: cssStyleDeclaration, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) + */ + attributeStyleMap: stylePropertyMap, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) + */ + mutable contentEditable: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/enterKeyHint) + */ + mutable enterKeyHint: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable) + */ + isContentEditable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inputMode) + */ + mutable inputMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) + */ + dataset: domStringMap, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce) + */ + mutable nonce?: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) + */ + mutable autofocus: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) + */ + mutable tabIndex: int, +} + +/** +A
element in the WebApiDOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. +[See HTMLFormElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(HTMLFormElement) and htmlFormElement = { + // Base properties from HTMLElement + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) + */ + mutable title: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) + */ + mutable lang: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) + */ + mutable translate: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) + */ + mutable dir: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) + */ + mutable inert: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) + */ + mutable accessKey: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) + */ + accessKeyLabel: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) + */ + mutable draggable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) + */ + mutable spellcheck: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) + */ + mutable autocapitalize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) + */ + mutable innerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) + */ + mutable outerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) + */ + mutable popover: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) + */ + offsetParent: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) + */ + offsetTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) + */ + offsetLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) + */ + offsetWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) + */ + offsetHeight: int, + // End base properties from HTMLElement + + // Base properties from Element + /** + Returns the namespace. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) + */ + namespaceURI: Null.t, + /** + Returns the namespace prefix. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) + */ + prefix: Null.t, + /** + Returns the local name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) + */ + localName: string, + /** + Returns the HTML-uppercased qualified name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) + */ + tagName: string, + /** + Returns the value of element's id content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) + */ + mutable id: string, + /** + Returns the value of element's class content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) + */ + mutable className: string, + /** + Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) + */ + classList: domTokenList, + /** + Returns the value of element's slot content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) + */ + mutable slot: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) + */ + attributes: namedNodeMap, + /** + Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) + */ + shadowRoot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) + */ + part: domTokenList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) + */ + mutable scrollTop: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) + */ + mutable scrollLeft: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) + */ + scrollWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) + */ + scrollHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) + */ + clientTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) + */ + clientLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) + */ + clientWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) + */ + clientHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) + */ + currentCSSZoom: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) + */ + @throws(JsExn) + mutable outerHTML: string, + // End base properties from Element + + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/acceptCharset) + */ + mutable acceptCharset: string, + /** + Sets or retrieves the WebApiURL to which the form content is sent for processing. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/action) + */ + mutable action: string, + /** + Specifies whether autocomplete is applied to an editable text field. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/autocomplete) + */ + mutable autocomplete: autoFillBase, + /** + Sets or retrieves the encoding type for the form. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/enctype) + */ + mutable enctype: string, + /** + Sets or retrieves the MIME encoding for the form. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/encoding) + */ + mutable encoding: string, + /** + Sets or retrieves how to send the form data to the server. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/method) + */ + mutable method: string, + /** + Sets or retrieves the name of the object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/name) + */ + mutable name: string, + /** + Sets or retrieves the window or frame at which to target content. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/target) + */ + mutable target: string, + /** + Retrieves a collection, in source order, of all controls in a given form. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/elements) + */ + elements: htmlFormControlsCollection, + /** + Sets or retrieves the number of objects in a collection. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/length) + */ + length: int, +} + +@editor.completeFrom(HTMLFormControlsCollection) +and htmlFormControlsCollection = { + length: int, +} + +@editor.completeFrom(HTMLSlotElement) +and htmlSlotElement = { + // Base properties from Element + /** + Returns the namespace. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) + */ + namespaceURI: Null.t, + /** + Returns the namespace prefix. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) + */ + prefix: Null.t, + /** + Returns the local name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) + */ + localName: string, + /** + Returns the HTML-uppercased qualified name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) + */ + tagName: string, + /** + Returns the value of element's id content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) + */ + mutable id: string, + /** + Returns the value of element's class content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) + */ + mutable className: string, + /** + Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) + */ + classList: domTokenList, + /** + Returns the value of element's slot content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) + */ + mutable slot: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) + */ + attributes: namedNodeMap, + /** + Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) + */ + shadowRoot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) + */ + part: domTokenList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) + */ + mutable scrollTop: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) + */ + mutable scrollLeft: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) + */ + scrollWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) + */ + scrollHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) + */ + clientTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) + */ + clientLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) + */ + clientWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) + */ + clientHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) + */ + currentCSSZoom: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) + */ + @throws(JsExn) + mutable outerHTML: string, + // End base properties from Element + + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) + */ + mutable title: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) + */ + mutable lang: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) + */ + mutable translate: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) + */ + mutable dir: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) + */ + mutable inert: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) + */ + mutable accessKey: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) + */ + accessKeyLabel: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) + */ + mutable draggable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) + */ + mutable spellcheck: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) + */ + mutable autocapitalize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) + */ + mutable innerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) + */ + mutable outerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) + */ + mutable popover: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) + */ + offsetParent: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) + */ + offsetTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) + */ + offsetLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) + */ + offsetWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) + */ + offsetHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) + */ + style: cssStyleDeclaration, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) + */ + attributeStyleMap: stylePropertyMap, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) + */ + mutable contentEditable: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/enterKeyHint) + */ + mutable enterKeyHint: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable) + */ + isContentEditable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inputMode) + */ + mutable inputMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) + */ + dataset: domStringMap, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce) + */ + mutable nonce?: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) + */ + mutable autofocus: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) + */ + mutable tabIndex: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSlotElement/name) + */ + mutable name: string, +} + +@editor.completeFrom(ElementInternals) +and elementInternals = { + shadowRoot: Null.t, + form: Null.t, + willValidate: bool, + validity: validityState, + validationMessage: string, + labels: nodeList, + states: customStateSet, + mutable ariaAtomic: Null.t, + mutable ariaAutoComplete: Null.t, + mutable ariaBrailleLabel: Null.t, + mutable ariaBrailleRoleDescription: Null.t, + mutable ariaBusy: Null.t, + mutable ariaChecked: Null.t, + mutable ariaColCount: Null.t, + mutable ariaColIndex: Null.t, + mutable ariaColIndexText: Null.t, + mutable ariaColSpan: Null.t, + mutable ariaCurrent: Null.t, + mutable ariaDescription: Null.t, + mutable ariaDisabled: Null.t, + mutable ariaExpanded: Null.t, + mutable ariaHasPopup: Null.t, + mutable ariaHidden: Null.t, + mutable ariaKeyShortcuts: Null.t, + mutable ariaLabel: Null.t, + mutable ariaLevel: Null.t, + mutable ariaLive: Null.t, + mutable ariaModal: Null.t, + mutable ariaMultiLine: Null.t, + mutable ariaMultiSelectable: Null.t, + mutable ariaOrientation: Null.t, + mutable ariaPlaceholder: Null.t, + mutable ariaPosInSet: Null.t, + mutable ariaPressed: Null.t, + mutable ariaReadOnly: Null.t, + mutable ariaRequired: Null.t, + mutable ariaRoleDescription: Null.t, + mutable ariaRowCount: Null.t, + mutable ariaRowIndex: Null.t, + mutable ariaRowIndexText: Null.t, + mutable ariaRowSpan: Null.t, + mutable ariaSelected: Null.t, + mutable ariaSetSize: Null.t, + mutable ariaSort: Null.t, + mutable ariaValueMax: Null.t, + mutable ariaValueMin: Null.t, + mutable ariaValueNow: Null.t, + mutable ariaValueText: Null.t, +} diff --git a/src/cssom/CSSStyleDeclaration.res b/src/cssom/CSSStyleDeclaration.res index 42e7ae6f..7bde769f 100644 --- a/src/cssom/CSSStyleDeclaration.res +++ b/src/cssom/CSSStyleDeclaration.res @@ -1,1706 +1,5 @@ @editor.completeFrom(CSSStyleDeclaration) -type t = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText) - */ - mutable cssText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/length) - */ - length: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule) - */ - parentRule: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cx) - */ - mutable cx: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cy) - */ - mutable cy: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/r) - */ - mutable r: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/rx) - */ - mutable rx: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ry) - */ - mutable ry: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/x) - */ - mutable x: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/y) - */ - mutable y: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/vector-effect) - */ - mutable vectorEffect: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/d) - */ - mutable d: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-anchor) - */ - mutable textAnchor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill) - */ - mutable fill: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke) - */ - mutable stroke: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-start) - */ - mutable markerStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-mid) - */ - mutable markerMid: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-end) - */ - mutable markerEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker) - */ - mutable marker: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/paint-order) - */ - mutable paintOrder: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-interpolation) - */ - mutable colorInterpolation: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-rendering) - */ - mutable shapeRendering: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-rendering) - */ - mutable textRendering: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/pointer-events) - */ - mutable pointerEvents: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stop-color) - */ - mutable stopColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stop-opacity) - */ - mutable stopOpacity: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color) - */ - mutable webkitTextFillColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color) - */ - mutable webkitTextStrokeColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width) - */ - mutable webkitTextStrokeWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke) - */ - mutable webkitTextStroke: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/touch-action) - */ - mutable touchAction: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/position-area) - */ - mutable positionArea: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/top) - */ - mutable top: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/left) - */ - mutable left: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/right) - */ - mutable right: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/bottom) - */ - mutable bottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-self) - */ - mutable justifySelf: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-self) - */ - mutable alignSelf: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-items) - */ - mutable justifyItems: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-items) - */ - mutable alignItems: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/width) - */ - mutable width: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/height) - */ - mutable height: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-width) - */ - mutable minWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-height) - */ - mutable minHeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-width) - */ - mutable maxWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-height) - */ - mutable maxHeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-top) - */ - mutable marginTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-left) - */ - mutable marginLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-right) - */ - mutable marginRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-bottom) - */ - mutable marginBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-duration) - */ - mutable animationDuration: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-composition) - */ - mutable animationComposition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-name) - */ - mutable animationName: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-timing-function) - */ - mutable animationTimingFunction: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count) - */ - mutable animationIterationCount: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-direction) - */ - mutable animationDirection: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-play-state) - */ - mutable animationPlayState: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-delay) - */ - mutable animationDelay: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode) - */ - mutable animationFillMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation) - */ - mutable animation: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/all) - */ - mutable all: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container-type) - */ - mutable containerType: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container-name) - */ - mutable containerName: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container) - */ - mutable container: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain) - */ - mutable contain: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/content-visibility) - */ - mutable contentVisibility: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-family) - */ - mutable fontFamily: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-weight) - */ - mutable fontWeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-style) - */ - mutable fontStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-size) - */ - mutable fontSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-size-adjust) - */ - mutable fontSizeAdjust: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font) - */ - mutable font: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight) - */ - mutable fontSynthesisWeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style) - */ - mutable fontSynthesisStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps) - */ - mutable fontSynthesisSmallCaps: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis) - */ - mutable fontSynthesis: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-kerning) - */ - mutable fontKerning: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures) - */ - mutable fontVariantLigatures: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-position) - */ - mutable fontVariantPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-caps) - */ - mutable fontVariantCaps: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric) - */ - mutable fontVariantNumeric: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates) - */ - mutable fontVariantAlternates: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian) - */ - mutable fontVariantEastAsian: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant) - */ - mutable fontVariant: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-feature-settings) - */ - mutable fontFeatureSettings: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing) - */ - mutable fontOpticalSizing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variation-settings) - */ - mutable fontVariationSettings: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-palette) - */ - mutable fontPalette: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-stretch) - */ - mutable fontStretch: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/object-fit) - */ - mutable objectFit: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clip-path) - */ - mutable clipPath: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clip-rule) - */ - mutable clipRule: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-image) - */ - mutable maskImage: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-mode) - */ - mutable maskMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-repeat) - */ - mutable maskRepeat: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-position) - */ - mutable maskPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-clip) - */ - mutable maskClip: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-origin) - */ - mutable maskOrigin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-size) - */ - mutable maskSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-composite) - */ - mutable maskComposite: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask) - */ - mutable mask: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-type) - */ - mutable maskType: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-behavior) - */ - mutable transitionBehavior: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-property) - */ - mutable transitionProperty: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-duration) - */ - mutable transitionDuration: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-timing-function) - */ - mutable transitionTimingFunction: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-delay) - */ - mutable transitionDelay: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition) - */ - mutable transition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/view-transition-name) - */ - mutable viewTransitionName: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/zoom) - */ - mutable zoom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/filter) - */ - mutable filter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-interpolation-filters) - */ - mutable colorInterpolationFilters: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/display) - */ - mutable display: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-transform) - */ - mutable textTransform: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/math-style) - */ - mutable mathStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/math-depth) - */ - mutable mathDepth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/z-index) - */ - mutable zIndex: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-before) - */ - mutable pageBreakBefore: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-after) - */ - mutable pageBreakAfter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-inside) - */ - mutable pageBreakInside: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode) - */ - mutable mixBlendMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/isolation) - */ - mutable isolation: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-blend-mode) - */ - mutable backgroundBlendMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-content) - */ - mutable alignContent: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-content) - */ - mutable justifyContent: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-content) - */ - mutable placeContent: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-self) - */ - mutable placeSelf: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-items) - */ - mutable placeItems: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/row-gap) - */ - mutable rowGap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-gap) - */ - mutable columnGap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/gap) - */ - mutable gap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-repeat) - */ - mutable backgroundRepeat: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position) - */ - mutable backgroundPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position-x) - */ - mutable backgroundPositionX: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position-y) - */ - mutable backgroundPositionY: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-clip) - */ - mutable backgroundClip: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-color) - */ - mutable backgroundColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-image) - */ - mutable backgroundImage: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-attachment) - */ - mutable backgroundAttachment: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-origin) - */ - mutable backgroundOrigin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-size) - */ - mutable backgroundSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background) - */ - mutable background: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-style) - */ - mutable borderStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-width) - */ - mutable borderWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border) - */ - mutable border: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-source) - */ - mutable borderImageSource: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-slice) - */ - mutable borderImageSlice: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-width) - */ - mutable borderImageWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-outset) - */ - mutable borderImageOutset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-repeat) - */ - mutable borderImageRepeat: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image) - */ - mutable borderImage: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-color) - */ - mutable borderTopColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-color) - */ - mutable borderRightColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-color) - */ - mutable borderBottomColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-color) - */ - mutable borderLeftColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-color) - */ - mutable borderBlockStartColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-color) - */ - mutable borderBlockEndColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color) - */ - mutable borderInlineStartColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color) - */ - mutable borderInlineEndColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-color) - */ - mutable borderColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-color) - */ - mutable borderBlockColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-color) - */ - mutable borderInlineColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-style) - */ - mutable borderTopStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-style) - */ - mutable borderRightStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-style) - */ - mutable borderBottomStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-style) - */ - mutable borderLeftStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-style) - */ - mutable borderBlockStartStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-style) - */ - mutable borderBlockEndStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style) - */ - mutable borderInlineStartStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style) - */ - mutable borderInlineEndStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-style) - */ - mutable borderBlockStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-style) - */ - mutable borderInlineStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-width) - */ - mutable borderTopWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-width) - */ - mutable borderRightWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-width) - */ - mutable borderBottomWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-width) - */ - mutable borderLeftWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-width) - */ - mutable borderBlockStartWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-width) - */ - mutable borderBlockEndWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width) - */ - mutable borderInlineStartWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width) - */ - mutable borderInlineEndWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-width) - */ - mutable borderBlockWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-width) - */ - mutable borderInlineWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top) - */ - mutable borderTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right) - */ - mutable borderRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom) - */ - mutable borderBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left) - */ - mutable borderLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start) - */ - mutable borderBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end) - */ - mutable borderBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start) - */ - mutable borderInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end) - */ - mutable borderInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block) - */ - mutable borderBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline) - */ - mutable borderInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius) - */ - mutable borderTopLeftRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius) - */ - mutable borderTopRightRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) - */ - mutable borderBottomRightRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius) - */ - mutable borderBottomLeftRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius) - */ - mutable borderStartStartRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) - */ - mutable borderStartEndRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius) - */ - mutable borderEndStartRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) - */ - mutable borderEndEndRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-radius) - */ - mutable borderRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-shadow) - */ - mutable boxShadow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin) - */ - mutable margin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-top) - */ - mutable paddingTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-right) - */ - mutable paddingRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-bottom) - */ - mutable paddingBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-left) - */ - mutable paddingLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding) - */ - mutable padding: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-before) - */ - mutable breakBefore: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-after) - */ - mutable breakAfter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-inside) - */ - mutable breakInside: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/orphans) - */ - mutable orphans: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/widows) - */ - mutable widows: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-decoration-break) - */ - mutable boxDecorationBreak: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-scheme) - */ - mutable colorScheme: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust) - */ - mutable forcedColorAdjust: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/print-color-adjust) - */ - mutable printColorAdjust: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color) - */ - mutable color: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/opacity) - */ - mutable opacity: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/content) - */ - mutable content: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/quotes) - */ - mutable quotes: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/order) - */ - mutable order: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/visibility) - */ - mutable visibility: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-direction) - */ - mutable flexDirection: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-wrap) - */ - mutable flexWrap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-flow) - */ - mutable flexFlow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex) - */ - mutable flex: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-grow) - */ - mutable flexGrow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-shrink) - */ - mutable flexShrink: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-basis) - */ - mutable flexBasis: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/position) - */ - mutable position: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/float) - */ - mutable float: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-columns) - */ - mutable gridTemplateColumns: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-rows) - */ - mutable gridTemplateRows: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow) - */ - mutable gridAutoFlow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-areas) - */ - mutable gridTemplateAreas: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template) - */ - mutable gridTemplate: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns) - */ - mutable gridAutoColumns: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows) - */ - mutable gridAutoRows: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid) - */ - mutable grid: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row-start) - */ - mutable gridRowStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column-start) - */ - mutable gridColumnStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row-end) - */ - mutable gridRowEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column-end) - */ - mutable gridColumnEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row) - */ - mutable gridRow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column) - */ - mutable gridColumn: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-area) - */ - mutable gridArea: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/object-position) - */ - mutable objectPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/image-rendering) - */ - mutable imageRendering: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/dominant-baseline) - */ - mutable dominantBaseline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/vertical-align) - */ - mutable verticalAlign: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/line-height) - */ - mutable lineHeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-image) - */ - mutable listStyleImage: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-type) - */ - mutable listStyleType: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-position) - */ - mutable listStylePosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style) - */ - mutable listStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-reset) - */ - mutable counterReset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-increment) - */ - mutable counterIncrement: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-set) - */ - mutable counterSet: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/block-size) - */ - mutable blockSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inline-size) - */ - mutable inlineSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-block-size) - */ - mutable minBlockSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-inline-size) - */ - mutable minInlineSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-block-size) - */ - mutable maxBlockSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-inline-size) - */ - mutable maxInlineSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block-start) - */ - mutable marginBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block-end) - */ - mutable marginBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start) - */ - mutable marginInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) - */ - mutable marginInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block) - */ - mutable marginBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline) - */ - mutable marginInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block-start) - */ - mutable paddingBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block-end) - */ - mutable paddingBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start) - */ - mutable paddingInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) - */ - mutable paddingInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block) - */ - mutable paddingBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline) - */ - mutable paddingInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-span) - */ - mutable columnSpan: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-width) - */ - mutable columnWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-count) - */ - mutable columnCount: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/columns) - */ - mutable columns: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-color) - */ - mutable columnRuleColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-style) - */ - mutable columnRuleStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-width) - */ - mutable columnRuleWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule) - */ - mutable columnRule: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-fill) - */ - mutable columnFill: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin) - */ - mutable overflowClipMargin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-overflow) - */ - mutable textOverflow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-x) - */ - mutable overflowX: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-y) - */ - mutable overflowY: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow) - */ - mutable overflow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-behavior) - */ - mutable scrollBehavior: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter) - */ - mutable scrollbarGutter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior) - */ - mutable overscrollBehavior: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x) - */ - mutable overscrollBehaviorX: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y) - */ - mutable overscrollBehaviorY: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline) - */ - mutable overscrollBehaviorInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block) - */ - mutable overscrollBehaviorBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clear) - */ - mutable clear: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page) - */ - mutable page: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block-start) - */ - mutable insetBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline-start) - */ - mutable insetInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block-end) - */ - mutable insetBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline-end) - */ - mutable insetInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block) - */ - mutable insetBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline) - */ - mutable insetInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset) - */ - mutable inset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ruby-position) - */ - mutable rubyPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ruby-align) - */ - mutable rubyAlign: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-anchor) - */ - mutable overflowAnchor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) - */ - mutable scrollSnapType: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding) - */ - mutable scrollPadding: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin) - */ - mutable scrollMargin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align) - */ - mutable scrollSnapAlign: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop) - */ - mutable scrollSnapStop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top) - */ - mutable scrollPaddingTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right) - */ - mutable scrollPaddingRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom) - */ - mutable scrollPaddingBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left) - */ - mutable scrollPaddingLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start) - */ - mutable scrollPaddingInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start) - */ - mutable scrollPaddingBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end) - */ - mutable scrollPaddingInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end) - */ - mutable scrollPaddingBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block) - */ - mutable scrollPaddingBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline) - */ - mutable scrollPaddingInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top) - */ - mutable scrollMarginTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right) - */ - mutable scrollMarginRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom) - */ - mutable scrollMarginBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left) - */ - mutable scrollMarginLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start) - */ - mutable scrollMarginBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start) - */ - mutable scrollMarginInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end) - */ - mutable scrollMarginBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end) - */ - mutable scrollMarginInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block) - */ - mutable scrollMarginBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline) - */ - mutable scrollMarginInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-color) - */ - mutable scrollbarColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-width) - */ - mutable scrollbarWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-outside) - */ - mutable shapeOutside: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold) - */ - mutable shapeImageThreshold: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-margin) - */ - mutable shapeMargin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/aspect-ratio) - */ - mutable aspectRatio: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width) - */ - mutable containIntrinsicWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height) - */ - mutable containIntrinsicHeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size) - */ - mutable containIntrinsicBlockSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size) - */ - mutable containIntrinsicInlineSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size) - */ - mutable containIntrinsicSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-sizing) - */ - mutable boxSizing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/table-layout) - */ - mutable tableLayout: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-collapse) - */ - mutable borderCollapse: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-spacing) - */ - mutable borderSpacing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/caption-side) - */ - mutable captionSide: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/empty-cells) - */ - mutable emptyCells: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/white-space) - */ - mutable whiteSpace: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/white-space-collapse) - */ - mutable whiteSpaceCollapse: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/tab-size) - */ - mutable tabSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap-mode) - */ - mutable textWrapMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap-style) - */ - mutable textWrapStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap) - */ - mutable textWrap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/word-break) - */ - mutable wordBreak: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/line-break) - */ - mutable lineBreak: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/hyphens) - */ - mutable hyphens: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/hyphenate-character) - */ - mutable hyphenateCharacter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-wrap) - */ - mutable overflowWrap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-align) - */ - mutable textAlign: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-align-last) - */ - mutable textAlignLast: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/word-spacing) - */ - mutable wordSpacing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) - */ - mutable letterSpacing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-indent) - */ - mutable textIndent: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-line) - */ - mutable textDecorationLine: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-style) - */ - mutable textDecorationStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-color) - */ - mutable textDecorationColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness) - */ - mutable textDecorationThickness: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration) - */ - mutable textDecoration: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-underline-position) - */ - mutable textUnderlinePosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-underline-offset) - */ - mutable textUnderlineOffset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink) - */ - mutable textDecorationSkipInk: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style) - */ - mutable textEmphasisStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color) - */ - mutable textEmphasisColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis) - */ - mutable textEmphasis: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position) - */ - mutable textEmphasisPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-shadow) - */ - mutable textShadow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/translate) - */ - mutable translate: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/rotate) - */ - mutable rotate: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scale) - */ - mutable scale: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-style) - */ - mutable transformStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/perspective) - */ - mutable perspective: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/perspective-origin) - */ - mutable perspectiveOrigin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/backface-visibility) - */ - mutable backfaceVisibility: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform) - */ - mutable transform: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-origin) - */ - mutable transformOrigin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-box) - */ - mutable transformBox: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline) - */ - mutable outline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-width) - */ - mutable outlineWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-style) - */ - mutable outlineStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-color) - */ - mutable outlineColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-offset) - */ - mutable outlineOffset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/resize) - */ - mutable resize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cursor) - */ - mutable cursor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/caret-color) - */ - mutable caretColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/user-select) - */ - mutable userSelect: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/accent-color) - */ - mutable accentColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/appearance) - */ - mutable appearance: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/will-change) - */ - mutable willChange: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/direction) - */ - mutable direction: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/unicode-bidi) - */ - mutable unicodeBidi: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/writing-mode) - */ - mutable writingMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-orientation) - */ - mutable textOrientation: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-combine-upright) - */ - mutable textCombineUpright: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill-rule) - */ - mutable fillRule: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill-opacity) - */ - mutable fillOpacity: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-width) - */ - mutable strokeWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-linecap) - */ - mutable strokeLinecap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin) - */ - mutable strokeLinejoin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit) - */ - mutable strokeMiterlimit: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray) - */ - mutable strokeDasharray: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset) - */ - mutable strokeDashoffset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-opacity) - */ - mutable strokeOpacity: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/backdrop-filter) - */ - mutable backdropFilter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-path) - */ - mutable offsetPath: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-distance) - */ - mutable offsetDistance: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-position) - */ - mutable offsetPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-anchor) - */ - mutable offsetAnchor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-rotate) - */ - mutable offsetRotate: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset) - */ - mutable offset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) - */ - mutable cssFloat: string, -} +type t = DOM.cssStyleDeclaration = {...DOM.cssStyleDeclaration} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/item) diff --git a/src/cssom/MediaList.res b/src/cssom/MediaList.res index 0472d672..a903868c 100644 --- a/src/cssom/MediaList.res +++ b/src/cssom/MediaList.res @@ -1,14 +1,5 @@ @editor.completeFrom(MediaList) -type t = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/mediaText) - */ - mutable mediaText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/length) - */ - length: int, -} +type t = DOM.mediaList = {...DOM.mediaList} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/item) diff --git a/src/cssom/StylePropertyMap.res b/src/cssom/StylePropertyMap.res index c87f65ac..7ce3744b 100644 --- a/src/cssom/StylePropertyMap.res +++ b/src/cssom/StylePropertyMap.res @@ -2,9 +2,7 @@ [See StylePropertyMap on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap) */ @editor.completeFrom(StylePropertyMap) -type t = private { - ...StylePropertyMapReadOnly.t, -} +type t = DOM.stylePropertyMap = private {...DOM.stylePropertyMap} external asStylePropertyMapReadOnly: t => StylePropertyMapReadOnly.t = "%identity" diff --git a/src/cssom/StylePropertyMapReadOnly.res b/src/cssom/StylePropertyMapReadOnly.res index 832efe84..1f2e5fba 100644 --- a/src/cssom/StylePropertyMapReadOnly.res +++ b/src/cssom/StylePropertyMapReadOnly.res @@ -2,12 +2,7 @@ [See StylePropertyMapReadOnly on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) */ @editor.completeFrom(StylePropertyMapReadOnly) -type t = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size) - */ - size: int, -} +type t = DOM.stylePropertyMapReadOnly = private {...DOM.stylePropertyMapReadOnly} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll) diff --git a/src/cssom/StyleSheet.res b/src/cssom/StyleSheet.res index 4b1b4c70..011518f8 100644 --- a/src/cssom/StyleSheet.res +++ b/src/cssom/StyleSheet.res @@ -1,118 +1,15 @@ @@warning("-30") -/** -A single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. -[See StyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet) -*/ -type rec t = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) - */ - @as("type") - type_: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) - */ - href: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) - */ - ownerNode: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) - */ - parentStyleSheet: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) - */ - title: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) - */ - media: MediaList.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) - */ - mutable disabled: bool, -} +@editor.completeFrom(StyleSheet) +type t = DOM.styleSheet = {...DOM.styleSheet} -/** -A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. -[See CSSStyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(CSSStyleSheet) and cssStyleSheet = { - // Base properties from StyleSheet - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) - */ - @as("type") - type_: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) - */ - href: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) - */ - ownerNode: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) - */ - parentStyleSheet: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) - */ - title: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) - */ - media: MediaList.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) - */ - mutable disabled: bool, - // End base properties from StyleSheet +@editor.completeFrom(CSSStyleSheet) +type cssStyleSheet = DOM.cssStyleSheet = {...DOM.cssStyleSheet} - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/ownerRule) - */ - ownerRule: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/cssRules) - */ - cssRules: cssRuleList, -} +type cssRule = DOM.cssRule = {...DOM.cssRule} -/** -A single CSS rule. There are several types of rules, listed in the Type constants section below. -[See CSSRule on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule) -*/ -and cssRule = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/cssText) - */ - mutable cssText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentRule) - */ - parentRule: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentStyleSheet) - */ - parentStyleSheet: Null.t, -} - -/** -A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. -[See CSSRuleList on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList) -*/ -@editor.completeFrom(CSSRuleList) and cssRuleList = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/length) - */ - length: int, -} +@editor.completeFrom(CSSRuleList) +type cssRuleList = DOM.cssRuleList = private {...DOM.cssRuleList} type init = { mutable baseURL?: string, diff --git a/src/cssom/StyleSheetList.res b/src/cssom/StyleSheetList.res index ac04e957..bb9ff3c9 100644 --- a/src/cssom/StyleSheetList.res +++ b/src/cssom/StyleSheetList.res @@ -3,12 +3,7 @@ A list of StyleSheet. [See StyleSheetList on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList) */ @editor.completeFrom(StyleSheetList) -type t = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/length) - */ - length: int, -} +type t = DOM.styleSheetList = private {...DOM.styleSheetList} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/item) diff --git a/src/dom-nodes/DOMTree.res b/src/dom-nodes/DOMTree.res index 9611fd51..677dff14 100644 --- a/src/dom-nodes/DOMTree.res +++ b/src/dom-nodes/DOMTree.res @@ -1,1648 +1,40 @@ @@warning("-30") -type shadowRootMode = +type shadowRootMode = DOM.shadowRootMode = | @as("closed") Closed | @as("open") Open -type slotAssignmentMode = +type slotAssignmentMode = DOM.domTreeSlotAssignmentMode = | @as("manual") Manual | @as("named") Named -type customStateSet = {} +type customStateSet = DOM.customStateSet = {...DOM.customStateSet} -/** -Node is an interface from which a number of WebApiDOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way. -[See Node on MDN](https://developer.mozilla.org/docs/Web/API/Node) -TODO: mark as private once mutating fields of private records is allowed -*/ @editor.completeFrom(Node) -type rec node = { - ...DOM.eventTarget, - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: DOM.nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, -} - -/** -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. -[See Element on MDN](https://developer.mozilla.org/docs/Web/API/Element) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(Element) and element = { - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: DOM.nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - Returns the namespace. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) - */ - namespaceURI: Null.t, - /** - Returns the namespace prefix. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) - */ - prefix: Null.t, - /** - Returns the local name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) - */ - localName: string, - /** - Returns the HTML-uppercased qualified name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) - */ - tagName: string, - /** - Returns the value of element's id content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) - */ - mutable id: string, - /** - Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) - */ - classList: DOM.domTokenList, - /** - Returns the value of element's slot content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) - */ - mutable slot: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) - */ - attributes: DOM.namedNodeMap, - /** - Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) - */ - shadowRoot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) - */ - part: DOM.domTokenList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) - */ - mutable scrollTop: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) - */ - mutable scrollLeft: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) - */ - scrollWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) - */ - scrollHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) - */ - clientTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) - */ - clientLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) - */ - clientWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) - */ - clientHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) - */ - currentCSSZoom: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) - */ - @throws(JsExn) - mutable outerHTML: string, - /** - Returns the child elements. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children) - */ - children: HTMLCollection.t, - /** - Returns the first child that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild) - */ - firstElementChild: Null.t, - /** - Returns the last child that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/lastElementChild) - */ - lastElementChild: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/childElementCount) - */ - childElementCount: int, - /** - Returns the first preceding sibling that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/previousElementSibling) - */ - previousElementSibling: Null.t, - /** - Returns the first following sibling that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/nextElementSibling) - */ - nextElementSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/assignedSlot) - */ - assignedSlot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaAtomic) - */ - mutable ariaAtomic: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaAutoComplete) - */ - mutable ariaAutoComplete: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleLabel) - */ - mutable ariaBrailleLabel: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleRoleDescription) - */ - mutable ariaBrailleRoleDescription: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBusy) - */ - mutable ariaBusy: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaChecked) - */ - mutable ariaChecked: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColCount) - */ - mutable ariaColCount: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndex) - */ - mutable ariaColIndex: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndexText) - */ - mutable ariaColIndexText: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) - */ - mutable ariaColSpan: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) - */ - mutable ariaCurrent: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaDescription) - */ - mutable ariaDescription: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaDisabled) - */ - mutable ariaDisabled: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaExpanded) - */ - mutable ariaExpanded: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaHasPopup) - */ - mutable ariaHasPopup: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaHidden) - */ - mutable ariaHidden: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaKeyShortcuts) - */ - mutable ariaKeyShortcuts: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLabel) - */ - mutable ariaLabel: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLevel) - */ - mutable ariaLevel: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLive) - */ - mutable ariaLive: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaModal) - */ - mutable ariaModal: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiLine) - */ - mutable ariaMultiLine: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiSelectable) - */ - mutable ariaMultiSelectable: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaOrientation) - */ - mutable ariaOrientation: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPlaceholder) - */ - mutable ariaPlaceholder: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPosInSet) - */ - mutable ariaPosInSet: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPressed) - */ - mutable ariaPressed: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaReadOnly) - */ - mutable ariaReadOnly: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRequired) - */ - mutable ariaRequired: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRoleDescription) - */ - mutable ariaRoleDescription: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowCount) - */ - mutable ariaRowCount: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndex) - */ - mutable ariaRowIndex: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndexText) - */ - mutable ariaRowIndexText: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowSpan) - */ - mutable ariaRowSpan: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSelected) - */ - mutable ariaSelected: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSetSize) - */ - mutable ariaSetSize: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSort) - */ - mutable ariaSort: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMax) - */ - mutable ariaValueMax: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMin) - */ - mutable ariaValueMin: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueNow) - */ - mutable ariaValueNow: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueText) - */ - mutable ariaValueText: Null.t, -} - -/** -A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. -[See DocumentFragment on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(DocumentFragment) and documentFragment = { - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: DOM.nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node +type node = DOM.node = {...DOM.node} - /** - Returns the child elements. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children) - */ - children: HTMLCollection.t, - /** - Returns the first child that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild) - */ - firstElementChild: Null.t, - /** - Returns the last child that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/lastElementChild) - */ - lastElementChild: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/childElementCount) - */ - childElementCount: int, -} +@editor.completeFrom(Element) +type element = DOM.element = {...DOM.element} -/** -[See ShadowRoot on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(ShadowRoot) and shadowRoot = { - // Base properties from DocumentFragment - // End base properties from DocumentFragment +@editor.completeFrom(DocumentFragment) +type documentFragment = DOM.documentFragment = {...DOM.documentFragment} - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: DOM.nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node +@editor.completeFrom(ShadowRoot) +type shadowRoot = DOM.shadowRoot = {...DOM.shadowRoot} - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/mode) - */ - mode: shadowRootMode, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/delegatesFocus) - */ - delegatesFocus: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/slotAssignment) - */ - slotAssignment: slotAssignmentMode, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/clonable) - */ - clonable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/serializable) - */ - serializable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/host) - */ - host: element, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/styleSheets) - */ - styleSheets: StyleSheetList.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/adoptedStyleSheets) - */ - @throws(JsExn) - mutable adoptedStyleSheets: array, - /** - Returns document's fullscreen element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/fullscreenElement) - */ - fullscreenElement: Null.t, - /** - Returns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document. +@editor.completeFrom(HTMLElement) +type htmlElement = DOM.htmlElement = {...DOM.htmlElement} -For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document. - -Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/activeElement) - */ - activeElement: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/pictureInPictureElement) - */ - pictureInPictureElement: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/pointerLockElement) - */ - pointerLockElement: Null.t, -} - -/** -Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. -[See HTMLElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(HTMLElement) and htmlElement = { - // Base properties from Element - /** - Returns the namespace. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) - */ - namespaceURI: Null.t, - /** - Returns the namespace prefix. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) - */ - prefix: Null.t, - /** - Returns the local name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) - */ - localName: string, - /** - Returns the HTML-uppercased qualified name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) - */ - tagName: string, - /** - Returns the value of element's id content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) - */ - mutable id: string, - /** - Returns the value of element's class content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) - */ - mutable className: string, - /** - Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) - */ - classList: DOM.domTokenList, - /** - Returns the value of element's slot content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) - */ - mutable slot: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) - */ - attributes: DOM.namedNodeMap, - /** - Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) - */ - shadowRoot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) - */ - part: DOM.domTokenList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) - */ - mutable scrollTop: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) - */ - mutable scrollLeft: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) - */ - scrollWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) - */ - scrollHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) - */ - clientTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) - */ - clientLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) - */ - clientWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) - */ - clientHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) - */ - currentCSSZoom: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) - */ - @throws(JsExn) - mutable outerHTML: string, - // End base properties from Element - - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: DOM.nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) - */ - mutable title: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) - */ - mutable lang: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) - */ - mutable translate: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) - */ - mutable dir: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) - */ - mutable inert: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) - */ - mutable accessKey: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) - */ - accessKeyLabel: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) - */ - mutable draggable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) - */ - mutable spellcheck: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) - */ - mutable autocapitalize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) - */ - mutable innerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) - */ - mutable outerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) - */ - mutable popover: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) - */ - offsetParent: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) - */ - offsetTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) - */ - offsetLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) - */ - offsetWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) - */ - offsetHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) - */ - style: CSSStyleDeclaration.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) - */ - attributeStyleMap: StylePropertyMap.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) - */ - mutable contentEditable: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/enterKeyHint) - */ - mutable enterKeyHint: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable) - */ - isContentEditable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inputMode) - */ - mutable inputMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) - */ - dataset: DOMStringMap.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce) - */ - mutable nonce?: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) - */ - mutable autofocus: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) - */ - mutable tabIndex: int, -} - -/** -A element in the WebApiDOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. -[See HTMLFormElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(HTMLFormElement) and htmlFormElement = { - // Base properties from HTMLElement - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) - */ - mutable title: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) - */ - mutable lang: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) - */ - mutable translate: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) - */ - mutable dir: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) - */ - mutable inert: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) - */ - mutable accessKey: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) - */ - accessKeyLabel: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) - */ - mutable draggable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) - */ - mutable spellcheck: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) - */ - mutable autocapitalize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) - */ - mutable innerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) - */ - mutable outerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) - */ - mutable popover: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) - */ - offsetParent: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) - */ - offsetTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) - */ - offsetLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) - */ - offsetWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) - */ - offsetHeight: int, - // End base properties from HTMLElement - - // Base properties from Element - /** - Returns the namespace. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) - */ - namespaceURI: Null.t, - /** - Returns the namespace prefix. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) - */ - prefix: Null.t, - /** - Returns the local name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) - */ - localName: string, - /** - Returns the HTML-uppercased qualified name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) - */ - tagName: string, - /** - Returns the value of element's id content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) - */ - mutable id: string, - /** - Returns the value of element's class content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) - */ - mutable className: string, - /** - Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) - */ - classList: DOM.domTokenList, - /** - Returns the value of element's slot content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) - */ - mutable slot: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) - */ - attributes: DOM.namedNodeMap, - /** - Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) - */ - shadowRoot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) - */ - part: DOM.domTokenList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) - */ - mutable scrollTop: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) - */ - mutable scrollLeft: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) - */ - scrollWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) - */ - scrollHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) - */ - clientTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) - */ - clientLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) - */ - clientWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) - */ - clientHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) - */ - currentCSSZoom: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) - */ - @throws(JsExn) - mutable outerHTML: string, - // End base properties from Element - - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: DOM.nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/acceptCharset) - */ - mutable acceptCharset: string, - /** - Sets or retrieves the WebApiURL to which the form content is sent for processing. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/action) - */ - mutable action: string, - /** - Specifies whether autocomplete is applied to an editable text field. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/autocomplete) - */ - mutable autocomplete: DOM.autoFillBase, - /** - Sets or retrieves the encoding type for the form. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/enctype) - */ - mutable enctype: string, - /** - Sets or retrieves the MIME encoding for the form. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/encoding) - */ - mutable encoding: string, - /** - Sets or retrieves how to send the form data to the server. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/method) - */ - mutable method: string, - /** - Sets or retrieves the name of the object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/name) - */ - mutable name: string, - /** - Sets or retrieves the window or frame at which to target content. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/target) - */ - mutable target: string, - /** - Retrieves a collection, in source order, of all controls in a given form. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/elements) - */ - elements: htmlFormControlsCollection, - /** - Sets or retrieves the number of objects in a collection. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/length) - */ - length: int, -} +@editor.completeFrom(HTMLFormElement) +type htmlFormElement = DOM.htmlFormElement = {...DOM.htmlFormElement} @editor.completeFrom(HTMLFormControlsCollection) -and htmlFormControlsCollection = { - length: int, +type htmlFormControlsCollection = DOM.htmlFormControlsCollection = { + ...DOM.htmlFormControlsCollection, } @editor.completeFrom(HTMLSlotElement) -and htmlSlotElement = { - // Base properties from Element - /** - Returns the namespace. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) - */ - namespaceURI: Null.t, - /** - Returns the namespace prefix. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) - */ - prefix: Null.t, - /** - Returns the local name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) - */ - localName: string, - /** - Returns the HTML-uppercased qualified name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) - */ - tagName: string, - /** - Returns the value of element's id content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) - */ - mutable id: string, - /** - Returns the value of element's class content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) - */ - mutable className: string, - /** - Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) - */ - classList: DOM.domTokenList, - /** - Returns the value of element's slot content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) - */ - mutable slot: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) - */ - attributes: DOM.namedNodeMap, - /** - Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) - */ - shadowRoot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) - */ - part: DOM.domTokenList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) - */ - mutable scrollTop: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) - */ - mutable scrollLeft: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) - */ - scrollWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) - */ - scrollHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) - */ - clientTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) - */ - clientLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) - */ - clientWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) - */ - clientHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) - */ - currentCSSZoom: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) - */ - @throws(JsExn) - mutable outerHTML: string, - // End base properties from Element - - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: DOM.nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) - */ - mutable title: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) - */ - mutable lang: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) - */ - mutable translate: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) - */ - mutable dir: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) - */ - mutable inert: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) - */ - mutable accessKey: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) - */ - accessKeyLabel: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) - */ - mutable draggable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) - */ - mutable spellcheck: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) - */ - mutable autocapitalize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) - */ - mutable innerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) - */ - mutable outerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) - */ - mutable popover: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) - */ - offsetParent: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) - */ - offsetTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) - */ - offsetLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) - */ - offsetWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) - */ - offsetHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) - */ - style: CSSStyleDeclaration.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) - */ - attributeStyleMap: StylePropertyMap.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) - */ - mutable contentEditable: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/enterKeyHint) - */ - mutable enterKeyHint: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable) - */ - isContentEditable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inputMode) - */ - mutable inputMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) - */ - dataset: DOMStringMap.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce) - */ - mutable nonce?: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) - */ - mutable autofocus: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) - */ - mutable tabIndex: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSlotElement/name) - */ - mutable name: string, -} +type htmlSlotElement = DOM.htmlSlotElement = {...DOM.htmlSlotElement} @editor.completeFrom(ElementInternals) -and elementInternals = { - shadowRoot: Null.t, - form: Null.t, - willValidate: bool, - validity: DOM.validityState, - validationMessage: string, - labels: DOM.nodeList, - states: customStateSet, - mutable ariaAtomic: Null.t, - mutable ariaAutoComplete: Null.t, - mutable ariaBrailleLabel: Null.t, - mutable ariaBrailleRoleDescription: Null.t, - mutable ariaBusy: Null.t, - mutable ariaChecked: Null.t, - mutable ariaColCount: Null.t, - mutable ariaColIndex: Null.t, - mutable ariaColIndexText: Null.t, - mutable ariaColSpan: Null.t, - mutable ariaCurrent: Null.t, - mutable ariaDescription: Null.t, - mutable ariaDisabled: Null.t, - mutable ariaExpanded: Null.t, - mutable ariaHasPopup: Null.t, - mutable ariaHidden: Null.t, - mutable ariaKeyShortcuts: Null.t, - mutable ariaLabel: Null.t, - mutable ariaLevel: Null.t, - mutable ariaLive: Null.t, - mutable ariaModal: Null.t, - mutable ariaMultiLine: Null.t, - mutable ariaMultiSelectable: Null.t, - mutable ariaOrientation: Null.t, - mutable ariaPlaceholder: Null.t, - mutable ariaPosInSet: Null.t, - mutable ariaPressed: Null.t, - mutable ariaReadOnly: Null.t, - mutable ariaRequired: Null.t, - mutable ariaRoleDescription: Null.t, - mutable ariaRowCount: Null.t, - mutable ariaRowIndex: Null.t, - mutable ariaRowIndexText: Null.t, - mutable ariaRowSpan: Null.t, - mutable ariaSelected: Null.t, - mutable ariaSetSize: Null.t, - mutable ariaSort: Null.t, - mutable ariaValueMax: Null.t, - mutable ariaValueMin: Null.t, - mutable ariaValueNow: Null.t, - mutable ariaValueText: Null.t, -} +type elementInternals = DOM.elementInternals = {...DOM.elementInternals} diff --git a/src/dom-nodes/HTMLCollection.res b/src/dom-nodes/HTMLCollection.res index ebc5280e..99b590a8 100644 --- a/src/dom-nodes/HTMLCollection.res +++ b/src/dom-nodes/HTMLCollection.res @@ -2,13 +2,7 @@ A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list. [See HTMLCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection) */ -type t<'item> = private { - /** - Sets or retrieves the number of objects in a collection. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/length) - */ - length: int, -} +type t<'item> = DOM.htmlCollection<'item> = private {...DOM.htmlCollection<'item>} /** Retrieves an object from various collections. diff --git a/src/dom-platform/DOMStringMap.res b/src/dom-platform/DOMStringMap.res index 639c8bce..ca4a41fc 100644 --- a/src/dom-platform/DOMStringMap.res +++ b/src/dom-platform/DOMStringMap.res @@ -2,4 +2,4 @@ Used by the dataset HTML attribute to represent data for custom attributes added to elements. [See DOMStringMap on MDN](https://developer.mozilla.org/docs/Web/API/DOMStringMap) */ -type t = private {} +type t = DOM.domStringMap = private {...DOM.domStringMap} From 4e2d12240d711c3824f34b43b05c1f877464a646 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Mon, 16 Nov 2026 17:22:12 -0500 Subject: [PATCH 5/7] experiment: isolate rich DOM and CSS type features --- docs/content/docs/api-surface.mdx | 26 +- rescript.json | 18 +- scripts/check-features.mjs | 27 +- scripts/consumer-cssom-types.res | 2 + scripts/consumer-dom-core.res | 8 +- scripts/consumer-dom-reexports.res | 99 +- scripts/consumer-dom-tree-disabled.res | 1 + scripts/consumer-dom-tree.res | 6 + .../DOMCollectionCannotBeConstructed.res | 2 +- .../DOMStyleMapCannotBeConstructed.res | 2 +- scripts/negative-fixtures.json | 4 +- src/core/DOM.res | 3531 ----------------- src/cssom-types/CSSOMTypes.res | 1863 +++++++++ src/cssom/CSSStyleDeclaration.res | 2 +- src/cssom/MediaList.res | 2 +- src/cssom/StylePropertyMap.res | 2 +- src/cssom/StylePropertyMapReadOnly.res | 2 +- src/cssom/StyleSheet.res | 8 +- src/cssom/StyleSheetList.res | 2 +- src/dom-nodes/DOMTree.res | 40 - src/dom-nodes/HTMLCollection.res | 2 +- .../DOMStringMap.res | 2 +- src/dom-tree/DOMTree.res | 1661 ++++++++ 23 files changed, 3658 insertions(+), 3654 deletions(-) create mode 100644 scripts/consumer-cssom-types.res create mode 100644 scripts/consumer-dom-tree-disabled.res create mode 100644 scripts/consumer-dom-tree.res create mode 100644 src/cssom-types/CSSOMTypes.res delete mode 100644 src/dom-nodes/DOMTree.res rename src/{dom-platform => dom-tree}/DOMStringMap.res (76%) create mode 100644 src/dom-tree/DOMTree.res diff --git a/docs/content/docs/api-surface.mdx b/docs/content/docs/api-surface.mdx index 884189c6..226a7c88 100644 --- a/docs/content/docs/api-surface.mdx +++ b/docs/content/docs/api-surface.mdx @@ -81,6 +81,7 @@ WebAPI.URL WebAPI.Fetch WebAPI.UIEvents WebAPI.Observers WebAPI.Media WebAPI.WebAudio WebAPI.Storage WebAPI.Messaging WebAPI.Workers WebAPI.Crypto WebAPI.Performance WebAPI.ViewTransitions +WebAPI.DOMTree WebAPI.CSSOMTypes WebAPI.History WebAPI.Location WebAPI.SafeFetch ``` @@ -115,21 +116,24 @@ and depends only on the core `WebAPI.DOM` feature. `WebAPI.Window` includes both features, so existing Window consumers keep the same API and type identities. For React bindings that need element, event, window, document, history, and location -types without the complete Window API, select: +types without the DOM operation modules, select: ```json { "dependencies": [ { "name": "@rescript/webapi", - "features": ["WebAPI.DOMNodes", "WebAPI.History", "WebAPI.Location"] + "features": ["WebAPI.DOMTree", "WebAPI.History", "WebAPI.Location"] } ] } ``` -DOMNodes already includes DOM transitively. This selection does not expose -`WebAPI.Window` or `WebAPI.Document`; add `WebAPI.Window` if you need their methods. +DOMTree includes the lightweight DOM types and the shared CSSOMTypes records. +It does not enable Element, Node, HTMLCollection, or CSSStyleDeclaration operation +modules. Select DOMNodes for element/node operations, CSSOM for CSS operations, +and Window for Window or Document methods. Existing operation features include +their required type features automatically. An unrestricted WebAPI dependency elsewhere in the dependency graph enables all features. ## Fetch @@ -434,15 +438,15 @@ let redirect = WebAPI.Response.redirect(~url="/login", ~status=302) ## DOM -`WebAPI.DOM` also exposes the core DOM record types for type-only consumers. For example, -`WebAPI.DOM.element` includes recursive node fields and `WebAPI.DOM.htmlElement` exposes -its CSS declaration style field without enabling DOM operation modules. Enable -`WebAPI.DOMNodes` when you need node/element methods from modules such as `WebAPI.Element`; -that bundle opts into those operations explicitly. +`WebAPI.DOM` stays lightweight: it supplies basic types such as window, document, +and event without pulling in the rich element or CSS declaration records. +`WebAPI.DOMTree` is the independently selectable rich DOM type surface, including +recursive element fields and HTML element styles. `WebAPI.CSSOMTypes` supplies +shared CSS representations without selecting CSS operations or DOMTree. ```ReScript -let parentNode = (element: WebAPI.DOM.element) => element.parentNode -let style = (element: WebAPI.DOM.htmlElement) => element.style +let parentNode = (element: WebAPI.DOMTree.element) => element.parentNode +let style = (element: WebAPI.DOMTree.htmlElement) => element.style ``` DOM values are operated on through public interface modules. diff --git a/rescript.json b/rescript.json index 83f718c2..474c7ebf 100644 --- a/rescript.json +++ b/rescript.json @@ -10,8 +10,11 @@ "WebAPI.DOMPlatform": ["WebAPI.Event", "DOMPlatform"], "WebAPI.Animation": ["WebAPI.Event", "Animation"], "WebAPI.Geometry": ["WebAPI.DOM", "Geometry"], - "WebAPI.CSSOM": ["WebAPI.Event", "CSSOM"], + "WebAPI.CSSOMTypes": ["CSSOMTypes"], + "WebAPI.CSSOM": ["WebAPI.Event", "WebAPI.CSSOMTypes", "CSSOM"], + "WebAPI.DOMTree": ["WebAPI.DOM", "WebAPI.CSSOMTypes", "DOMTree"], "WebAPI.DOMNodes": [ + "WebAPI.DOMTree", "WebAPI.DOMPlatform", "WebAPI.Animation", "WebAPI.CSSOM", @@ -90,6 +93,18 @@ "DOMTokenList" ] }, + { + "dir": "src/cssom-types", + "subdirs": true, + "feature": "CSSOMTypes", + "public": ["CSSOMTypes"] + }, + { + "dir": "src/dom-tree", + "subdirs": true, + "feature": "DOMTree", + "public": ["DOMTree"] + }, { "dir": "src/dom-nodes", "subdirs": true, @@ -102,7 +117,6 @@ "CharacterData", "Comment", "DOMImplementation", - "DOMTree", "DocumentFragment", "Element", "ElementInternals", diff --git a/scripts/check-features.mjs b/scripts/check-features.mjs index 363d7a72..fc499098 100644 --- a/scripts/check-features.mjs +++ b/scripts/check-features.mjs @@ -22,12 +22,14 @@ const expectedFeatureOwners = new Map([ ["WebAPI.DOM", "DOM"], ["WebAPI.Event", "Event"], ["WebAPI.DOMPlatform", "DOMPlatform"], + ["WebAPI.DOMTree", "DOMTree"], ["WebAPI.DOMNodes", "DOMNodes"], ["WebAPI.File", "File"], ["WebAPI.HTML", "HTML"], ["WebAPI.History", "History"], ["WebAPI.Location", "Location"], ["WebAPI.Window", "Window"], + ["WebAPI.CSSOMTypes", "CSSOMTypes"], ["WebAPI.CSSOM", "CSSOM"], ["WebAPI.CSSFontLoading", "CSSFontLoading"], ["WebAPI.Geometry", "Geometry"], @@ -388,18 +390,37 @@ if (process.argv[1] !== undefined && path.resolve(process.argv[1]) === scriptPat shouldCompile: false, }, { - name: "Core DOM type consumer", + name: "Basic DOM type consumer", features: ["WebAPI.DOM"], fixture: "consumer-dom-core.res", shouldCompile: true, }, { - name: "DOM feature does not expose Element operations", - features: ["WebAPI.DOM"], + name: "DOMTree feature does not expose Element operations", + features: ["WebAPI.DOMTree"], fixture: "consumer-dom-element-disabled.res", shouldCompile: false, missingModule: "Element", }, + { + name: "DOM-tree type consumer", + features: ["WebAPI.DOMTree"], + fixture: "consumer-dom-tree.res", + shouldCompile: true, + }, + { + name: "CSS-only type consumer", + features: ["WebAPI.CSSOMTypes"], + fixture: "consumer-cssom-types.res", + shouldCompile: true, + }, + { + name: "CSSOM does not enable DOMTree", + features: ["WebAPI.CSSOM"], + fixture: "consumer-dom-tree-disabled.res", + shouldCompile: false, + missingModule: "DOMTree", + }, { name: "DOM moved type re-exports", features: ["WebAPI.DOMNodes", "WebAPI.HTML", "WebAPI.Window", "WebAPI.CSSOM"], diff --git a/scripts/consumer-cssom-types.res b/scripts/consumer-cssom-types.res new file mode 100644 index 00000000..eac90e40 --- /dev/null +++ b/scripts/consumer-cssom-types.res @@ -0,0 +1,2 @@ +let cssText = (style: WebAPI.CSSOMTypes.cssStyleDeclaration) => style.cssText +let rule = (style: WebAPI.CSSOMTypes.cssStyleDeclaration) => style.parentRule diff --git a/scripts/consumer-dom-core.res b/scripts/consumer-dom-core.res index 7deb16a5..5624962e 100644 --- a/scripts/consumer-dom-core.res +++ b/scripts/consumer-dom-core.res @@ -1,9 +1,5 @@ -let elementIdentity: WebAPI.DOM.element => WebAPI.DOM.element = value => value -let parentNode = (element: WebAPI.DOM.element) => element.parentNode -let childNodes = (element: WebAPI.DOM.element) => element.childNodes -let style = (element: WebAPI.DOM.htmlElement) => element.style - -// Preserve inference of pre-existing constructors, not only annotated use. +let eventType = (event: WebAPI.DOM.event) => event.type_ +let windowIdentity: WebAPI.DOM.window => WebAPI.DOM.window = value => value let inferredManual = WebAPI.DOM.Manual let legacyManual: WebAPI.DOM.slotAssignmentMode = inferredManual let inferredNamed = WebAPI.DOM.Named diff --git a/scripts/consumer-dom-reexports.res b/scripts/consumer-dom-reexports.res index 54a1f4c8..ab9d6b88 100644 --- a/scripts/consumer-dom-reexports.res +++ b/scripts/consumer-dom-reexports.res @@ -1,79 +1,86 @@ -let domElement: WebAPI.DOM.element => WebAPI.Element.t = value => value -let elementDom: WebAPI.Element.t => WebAPI.DOM.element = value => value -let node: WebAPI.DOMTree.node => WebAPI.DOM.node = value => value -let nodeBack: WebAPI.DOM.node => WebAPI.DOMTree.node = value => value -let html: WebAPI.DOM.htmlElement => WebAPI.DOMTree.htmlElement = value => value -let htmlBack: WebAPI.DOMTree.htmlElement => WebAPI.DOM.htmlElement = value => value -let collection: WebAPI.DOM.htmlCollection<'item> => WebAPI.HTMLCollection.t<'item> = value => value - -let collectionBack: WebAPI.HTMLCollection.t<'item> => WebAPI.DOM.htmlCollection<'item> = value => +let domElement: WebAPI.DOMTree.element => WebAPI.Element.t = value => value +let elementDom: WebAPI.Element.t => WebAPI.DOMTree.element = value => value +let node: WebAPI.DOMTree.node => WebAPI.DOMTree.node = value => value +let nodeBack: WebAPI.DOMTree.node => WebAPI.DOMTree.node = value => value +let html: WebAPI.DOMTree.htmlElement => WebAPI.DOMTree.htmlElement = value => value +let htmlBack: WebAPI.DOMTree.htmlElement => WebAPI.DOMTree.htmlElement = value => value + +let collection: WebAPI.DOMTree.htmlCollection<'item> => WebAPI.HTMLCollection.t<'item> = value => value -let declaration: WebAPI.DOM.cssStyleDeclaration => WebAPI.CSSStyleDeclaration.t = value => value -let declarationBack: WebAPI.CSSStyleDeclaration.t => WebAPI.DOM.cssStyleDeclaration = value => value -let styleMap: WebAPI.DOM.stylePropertyMap => WebAPI.StylePropertyMap.t = value => value -let styleMapBack: WebAPI.StylePropertyMap.t => WebAPI.DOM.stylePropertyMap = value => value +let collectionBack: WebAPI.HTMLCollection.t<'item> => WebAPI.DOMTree.htmlCollection< + 'item, +> = value => value + +let declaration: WebAPI.CSSOMTypes.cssStyleDeclaration => WebAPI.CSSStyleDeclaration.t = value => + value + +let declarationBack: WebAPI.CSSStyleDeclaration.t => WebAPI.CSSOMTypes.cssStyleDeclaration = value => + value + +let styleMap: WebAPI.CSSOMTypes.stylePropertyMap => WebAPI.StylePropertyMap.t = value => value +let styleMapBack: WebAPI.StylePropertyMap.t => WebAPI.CSSOMTypes.stylePropertyMap = value => value let mode: WebAPI.DOMTree.slotAssignmentMode = WebAPI.DOMTree.Manual -let toPublic0: WebAPI.DOM.node => WebAPI.Node.t = value => value -let toCore0: WebAPI.Node.t => WebAPI.DOM.node = value => value +let toPublic0: WebAPI.DOMTree.node => WebAPI.Node.t = value => value +let toCore0: WebAPI.Node.t => WebAPI.DOMTree.node = value => value -let toPublic1: WebAPI.DOM.documentFragment => WebAPI.DocumentFragment.t = value => value -let toCore1: WebAPI.DocumentFragment.t => WebAPI.DOM.documentFragment = value => value +let toPublic1: WebAPI.DOMTree.documentFragment => WebAPI.DocumentFragment.t = value => value +let toCore1: WebAPI.DocumentFragment.t => WebAPI.DOMTree.documentFragment = value => value -let toPublic2: WebAPI.DOM.shadowRoot => WebAPI.ShadowRoot.t = value => value -let toCore2: WebAPI.ShadowRoot.t => WebAPI.DOM.shadowRoot = value => value +let toPublic2: WebAPI.DOMTree.shadowRoot => WebAPI.ShadowRoot.t = value => value +let toCore2: WebAPI.ShadowRoot.t => WebAPI.DOMTree.shadowRoot = value => value -let toPublic3: WebAPI.DOM.htmlElement => WebAPI.HTMLElement.t = value => value -let toCore3: WebAPI.HTMLElement.t => WebAPI.DOM.htmlElement = value => value +let toPublic3: WebAPI.DOMTree.htmlElement => WebAPI.HTMLElement.t = value => value +let toCore3: WebAPI.HTMLElement.t => WebAPI.DOMTree.htmlElement = value => value -let toPublic4: WebAPI.DOM.htmlFormElement => WebAPI.HTMLFormElement.t = value => value -let toCore4: WebAPI.HTMLFormElement.t => WebAPI.DOM.htmlFormElement = value => value +let toPublic4: WebAPI.DOMTree.htmlFormElement => WebAPI.HTMLFormElement.t = value => value +let toCore4: WebAPI.HTMLFormElement.t => WebAPI.DOMTree.htmlFormElement = value => value -let toPublic5: WebAPI.DOM.htmlFormControlsCollection => WebAPI.HTMLFormControlsCollection.t = value => +let toPublic5: WebAPI.DOMTree.htmlFormControlsCollection => WebAPI.HTMLFormControlsCollection.t = value => value -let toCore5: WebAPI.HTMLFormControlsCollection.t => WebAPI.DOM.htmlFormControlsCollection = value => +let toCore5: WebAPI.HTMLFormControlsCollection.t => WebAPI.DOMTree.htmlFormControlsCollection = value => value -let toPublic6: WebAPI.DOM.htmlSlotElement => WebAPI.HTMLSlotElement.t = value => value -let toCore6: WebAPI.HTMLSlotElement.t => WebAPI.DOM.htmlSlotElement = value => value +let toPublic6: WebAPI.DOMTree.htmlSlotElement => WebAPI.HTMLSlotElement.t = value => value +let toCore6: WebAPI.HTMLSlotElement.t => WebAPI.DOMTree.htmlSlotElement = value => value -let toPublic7: WebAPI.DOM.elementInternals => WebAPI.ElementInternals.t = value => value -let toCore7: WebAPI.ElementInternals.t => WebAPI.DOM.elementInternals = value => value +let toPublic7: WebAPI.DOMTree.elementInternals => WebAPI.ElementInternals.t = value => value +let toCore7: WebAPI.ElementInternals.t => WebAPI.DOMTree.elementInternals = value => value -let toPublic8: WebAPI.DOM.styleSheet => WebAPI.StyleSheet.t = value => value -let toCore8: WebAPI.StyleSheet.t => WebAPI.DOM.styleSheet = value => value +let toPublic8: WebAPI.CSSOMTypes.styleSheet => WebAPI.StyleSheet.t = value => value +let toCore8: WebAPI.StyleSheet.t => WebAPI.CSSOMTypes.styleSheet = value => value -let toPublic9: WebAPI.DOM.cssStyleSheet => WebAPI.StyleSheet.cssStyleSheet = value => value -let toCore9: WebAPI.StyleSheet.cssStyleSheet => WebAPI.DOM.cssStyleSheet = value => value +let toPublic9: WebAPI.CSSOMTypes.cssStyleSheet => WebAPI.StyleSheet.cssStyleSheet = value => value +let toCore9: WebAPI.StyleSheet.cssStyleSheet => WebAPI.CSSOMTypes.cssStyleSheet = value => value -let toPublic10: WebAPI.DOM.cssRule => WebAPI.StyleSheet.cssRule = value => value -let toCore10: WebAPI.StyleSheet.cssRule => WebAPI.DOM.cssRule = value => value +let toPublic10: WebAPI.CSSOMTypes.cssRule => WebAPI.StyleSheet.cssRule = value => value +let toCore10: WebAPI.StyleSheet.cssRule => WebAPI.CSSOMTypes.cssRule = value => value -let toPublic11: WebAPI.DOM.cssRuleList => WebAPI.CSSRuleList.t = value => value -let toCore11: WebAPI.CSSRuleList.t => WebAPI.DOM.cssRuleList = value => value +let toPublic11: WebAPI.CSSOMTypes.cssRuleList => WebAPI.CSSRuleList.t = value => value +let toCore11: WebAPI.CSSRuleList.t => WebAPI.CSSOMTypes.cssRuleList = value => value -let toPublic12: WebAPI.DOM.stylePropertyMapReadOnly => WebAPI.StylePropertyMapReadOnly.t = value => +let toPublic12: WebAPI.CSSOMTypes.stylePropertyMapReadOnly => WebAPI.StylePropertyMapReadOnly.t = value => value -let toCore12: WebAPI.StylePropertyMapReadOnly.t => WebAPI.DOM.stylePropertyMapReadOnly = value => +let toCore12: WebAPI.StylePropertyMapReadOnly.t => WebAPI.CSSOMTypes.stylePropertyMapReadOnly = value => value -let toPublic13: WebAPI.DOM.styleSheetList => WebAPI.StyleSheetList.t = value => value -let toCore13: WebAPI.StyleSheetList.t => WebAPI.DOM.styleSheetList = value => value +let toPublic13: WebAPI.CSSOMTypes.styleSheetList => WebAPI.StyleSheetList.t = value => value +let toCore13: WebAPI.StyleSheetList.t => WebAPI.CSSOMTypes.styleSheetList = value => value -let toPublic14: WebAPI.DOM.mediaList => WebAPI.MediaList.t = value => value -let toCore14: WebAPI.MediaList.t => WebAPI.DOM.mediaList = value => value +let toPublic14: WebAPI.CSSOMTypes.mediaList => WebAPI.MediaList.t = value => value +let toCore14: WebAPI.MediaList.t => WebAPI.CSSOMTypes.mediaList = value => value let treeMode = WebAPI.DOMTree.Manual let preservedTreeMode: WebAPI.DOMTree.slotAssignmentMode = treeMode -let adoptedSheets = (root: WebAPI.DOM.shadowRoot): array => +let adoptedSheets = (root: WebAPI.DOMTree.shadowRoot): array => root.adoptedStyleSheets -let styleParent = (style: WebAPI.CSSStyleDeclaration.t): Null.t => +let styleParent = (style: WebAPI.CSSStyleDeclaration.t): Null.t => style.parentRule -let dataset = (element: WebAPI.HTMLElement.t): WebAPI.DOM.domStringMap => element.dataset +let dataset = (element: WebAPI.HTMLElement.t) => element.dataset let mutateStyle = (style: WebAPI.CSSStyleDeclaration.t, color: string) => style.color = color diff --git a/scripts/consumer-dom-tree-disabled.res b/scripts/consumer-dom-tree-disabled.res new file mode 100644 index 00000000..a51aa470 --- /dev/null +++ b/scripts/consumer-dom-tree-disabled.res @@ -0,0 +1 @@ +module Unavailable = WebAPI.DOMTree diff --git a/scripts/consumer-dom-tree.res b/scripts/consumer-dom-tree.res new file mode 100644 index 00000000..2f5023b7 --- /dev/null +++ b/scripts/consumer-dom-tree.res @@ -0,0 +1,6 @@ +let elementIdentity: WebAPI.DOMTree.element => WebAPI.DOMTree.element = value => value +let parentNode = (element: WebAPI.DOMTree.element) => element.parentNode +let childNodes = (element: WebAPI.DOMTree.element) => element.childNodes +let style = (element: WebAPI.DOMTree.htmlElement) => element.style +let inferredManual = WebAPI.DOMTree.Manual +let mode: WebAPI.DOMTree.slotAssignmentMode = inferredManual diff --git a/scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res b/scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res index 5227f501..489728b3 100644 --- a/scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res +++ b/scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res @@ -1 +1 @@ -let invalid: WebAPI.DOM.htmlCollection = {length: 0} +let invalid: WebAPI.DOMTree.htmlCollection = {length: 0} diff --git a/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res b/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res index 3f6b6c8a..ce292bcc 100644 --- a/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res +++ b/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res @@ -1 +1 @@ -let invalid: WebAPI.DOM.stylePropertyMap = {size: 0} +let invalid: WebAPI.CSSOMTypes.stylePropertyMap = {size: 0} diff --git a/scripts/negative-fixtures.json b/scripts/negative-fixtures.json index 77779693..d3b327ae 100644 --- a/scripts/negative-fixtures.json +++ b/scripts/negative-fixtures.json @@ -152,13 +152,13 @@ { "name": "private DOM collection cannot be constructed", "fixture": "scripts/fixtures/negative/DOMCollectionCannotBeConstructed.res", - "features": ["WebAPI.DOM"], + "features": ["WebAPI.DOMTree"], "expectedDiagnostic": "Cannot create values of the" }, { "name": "private DOM style map cannot be constructed", "fixture": "scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res", - "features": ["WebAPI.DOM"], + "features": ["WebAPI.CSSOMTypes"], "expectedDiagnostic": "Cannot create values of the" } ] diff --git a/src/core/DOM.res b/src/core/DOM.res index 6f457b67..931d2252 100644 --- a/src/core/DOM.res +++ b/src/core/DOM.res @@ -607,10 +607,6 @@ type namedNodeMap = private { type structuredSerializeOptions = {mutable transfer?: array>} -type domTreeSlotAssignmentMode = - | @as("manual") Manual - | @as("named") Named - type slotAssignmentMode = | @as("manual") Manual | @as("named") Named @@ -1031,3530 +1027,3 @@ type imageBitmapSource type customElementConstructor type timeoutId - -// Shared DOM representations; operations stay in their owning API modules. - -/** -A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list. -[See HTMLCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection) -*/ -@editor.completeFrom(HTMLCollection) -type htmlCollection<'item> = private { - /** - Sets or retrieves the number of objects in a collection. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/length) - */ - length: int, -} - -/** -Used by the dataset HTML attribute to represent data for custom attributes added to elements. -[See DOMStringMap on MDN](https://developer.mozilla.org/docs/Web/API/DOMStringMap) -*/ -@editor.completeFrom(DOMStringMap) -type domStringMap = private {} - -/** -[See StylePropertyMapReadOnly on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) -*/ -@editor.completeFrom(StylePropertyMapReadOnly) -type stylePropertyMapReadOnly = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size) - */ - size: int, -} - -/** -[See StylePropertyMap on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap) -*/ -@editor.completeFrom(StylePropertyMap) -type stylePropertyMap = private { - ...stylePropertyMapReadOnly, -} - -@editor.completeFrom(MediaList) -type mediaList = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/mediaText) - */ - mutable mediaText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/length) - */ - length: int, -} - -/** -A list of StyleSheet. -[See StyleSheetList on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList) -*/ -@editor.completeFrom(StyleSheetList) -type styleSheetList = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/length) - */ - length: int, -} - -/** -A single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. -[See StyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet) -*/ -@editor.completeFrom(StyleSheet) -type rec styleSheet = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) - */ - @as("type") - type_: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) - */ - href: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) - */ - ownerNode: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) - */ - parentStyleSheet: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) - */ - title: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) - */ - media: mediaList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) - */ - mutable disabled: bool, -} - -/** -A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. -[See CSSStyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(CSSStyleSheet) and cssStyleSheet = { - // Base properties from StyleSheet - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) - */ - @as("type") - type_: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) - */ - href: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) - */ - ownerNode: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) - */ - parentStyleSheet: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) - */ - title: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) - */ - media: mediaList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) - */ - mutable disabled: bool, - // End base properties from StyleSheet - - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/ownerRule) - */ - ownerRule: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/cssRules) - */ - cssRules: cssRuleList, -} - -/** -A single CSS rule. There are several types of rules, listed in the Type constants section below. -[See CSSRule on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule) -*/ -and cssRule = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/cssText) - */ - mutable cssText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentRule) - */ - parentRule: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentStyleSheet) - */ - parentStyleSheet: Null.t, -} - -/** -A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. -[See CSSRuleList on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList) -*/ -@editor.completeFrom(CSSRuleList) and cssRuleList = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/length) - */ - length: int, -} - -@editor.completeFrom(CSSStyleDeclaration) -type cssStyleDeclaration = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText) - */ - mutable cssText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/length) - */ - length: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule) - */ - parentRule: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cx) - */ - mutable cx: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cy) - */ - mutable cy: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/r) - */ - mutable r: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/rx) - */ - mutable rx: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ry) - */ - mutable ry: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/x) - */ - mutable x: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/y) - */ - mutable y: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/vector-effect) - */ - mutable vectorEffect: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/d) - */ - mutable d: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-anchor) - */ - mutable textAnchor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill) - */ - mutable fill: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke) - */ - mutable stroke: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-start) - */ - mutable markerStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-mid) - */ - mutable markerMid: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-end) - */ - mutable markerEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker) - */ - mutable marker: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/paint-order) - */ - mutable paintOrder: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-interpolation) - */ - mutable colorInterpolation: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-rendering) - */ - mutable shapeRendering: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-rendering) - */ - mutable textRendering: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/pointer-events) - */ - mutable pointerEvents: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stop-color) - */ - mutable stopColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stop-opacity) - */ - mutable stopOpacity: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color) - */ - mutable webkitTextFillColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color) - */ - mutable webkitTextStrokeColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width) - */ - mutable webkitTextStrokeWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke) - */ - mutable webkitTextStroke: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/touch-action) - */ - mutable touchAction: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/position-area) - */ - mutable positionArea: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/top) - */ - mutable top: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/left) - */ - mutable left: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/right) - */ - mutable right: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/bottom) - */ - mutable bottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-self) - */ - mutable justifySelf: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-self) - */ - mutable alignSelf: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-items) - */ - mutable justifyItems: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-items) - */ - mutable alignItems: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/width) - */ - mutable width: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/height) - */ - mutable height: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-width) - */ - mutable minWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-height) - */ - mutable minHeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-width) - */ - mutable maxWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-height) - */ - mutable maxHeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-top) - */ - mutable marginTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-left) - */ - mutable marginLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-right) - */ - mutable marginRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-bottom) - */ - mutable marginBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-duration) - */ - mutable animationDuration: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-composition) - */ - mutable animationComposition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-name) - */ - mutable animationName: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-timing-function) - */ - mutable animationTimingFunction: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count) - */ - mutable animationIterationCount: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-direction) - */ - mutable animationDirection: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-play-state) - */ - mutable animationPlayState: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-delay) - */ - mutable animationDelay: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode) - */ - mutable animationFillMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation) - */ - mutable animation: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/all) - */ - mutable all: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container-type) - */ - mutable containerType: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container-name) - */ - mutable containerName: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container) - */ - mutable container: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain) - */ - mutable contain: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/content-visibility) - */ - mutable contentVisibility: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-family) - */ - mutable fontFamily: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-weight) - */ - mutable fontWeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-style) - */ - mutable fontStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-size) - */ - mutable fontSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-size-adjust) - */ - mutable fontSizeAdjust: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font) - */ - mutable font: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight) - */ - mutable fontSynthesisWeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style) - */ - mutable fontSynthesisStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps) - */ - mutable fontSynthesisSmallCaps: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis) - */ - mutable fontSynthesis: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-kerning) - */ - mutable fontKerning: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures) - */ - mutable fontVariantLigatures: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-position) - */ - mutable fontVariantPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-caps) - */ - mutable fontVariantCaps: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric) - */ - mutable fontVariantNumeric: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates) - */ - mutable fontVariantAlternates: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian) - */ - mutable fontVariantEastAsian: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant) - */ - mutable fontVariant: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-feature-settings) - */ - mutable fontFeatureSettings: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing) - */ - mutable fontOpticalSizing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variation-settings) - */ - mutable fontVariationSettings: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-palette) - */ - mutable fontPalette: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-stretch) - */ - mutable fontStretch: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/object-fit) - */ - mutable objectFit: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clip-path) - */ - mutable clipPath: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clip-rule) - */ - mutable clipRule: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-image) - */ - mutable maskImage: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-mode) - */ - mutable maskMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-repeat) - */ - mutable maskRepeat: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-position) - */ - mutable maskPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-clip) - */ - mutable maskClip: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-origin) - */ - mutable maskOrigin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-size) - */ - mutable maskSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-composite) - */ - mutable maskComposite: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask) - */ - mutable mask: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-type) - */ - mutable maskType: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-behavior) - */ - mutable transitionBehavior: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-property) - */ - mutable transitionProperty: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-duration) - */ - mutable transitionDuration: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-timing-function) - */ - mutable transitionTimingFunction: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-delay) - */ - mutable transitionDelay: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition) - */ - mutable transition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/view-transition-name) - */ - mutable viewTransitionName: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/zoom) - */ - mutable zoom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/filter) - */ - mutable filter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-interpolation-filters) - */ - mutable colorInterpolationFilters: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/display) - */ - mutable display: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-transform) - */ - mutable textTransform: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/math-style) - */ - mutable mathStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/math-depth) - */ - mutable mathDepth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/z-index) - */ - mutable zIndex: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-before) - */ - mutable pageBreakBefore: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-after) - */ - mutable pageBreakAfter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-inside) - */ - mutable pageBreakInside: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode) - */ - mutable mixBlendMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/isolation) - */ - mutable isolation: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-blend-mode) - */ - mutable backgroundBlendMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-content) - */ - mutable alignContent: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-content) - */ - mutable justifyContent: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-content) - */ - mutable placeContent: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-self) - */ - mutable placeSelf: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-items) - */ - mutable placeItems: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/row-gap) - */ - mutable rowGap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-gap) - */ - mutable columnGap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/gap) - */ - mutable gap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-repeat) - */ - mutable backgroundRepeat: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position) - */ - mutable backgroundPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position-x) - */ - mutable backgroundPositionX: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position-y) - */ - mutable backgroundPositionY: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-clip) - */ - mutable backgroundClip: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-color) - */ - mutable backgroundColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-image) - */ - mutable backgroundImage: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-attachment) - */ - mutable backgroundAttachment: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-origin) - */ - mutable backgroundOrigin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-size) - */ - mutable backgroundSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background) - */ - mutable background: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-style) - */ - mutable borderStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-width) - */ - mutable borderWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border) - */ - mutable border: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-source) - */ - mutable borderImageSource: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-slice) - */ - mutable borderImageSlice: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-width) - */ - mutable borderImageWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-outset) - */ - mutable borderImageOutset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-repeat) - */ - mutable borderImageRepeat: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image) - */ - mutable borderImage: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-color) - */ - mutable borderTopColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-color) - */ - mutable borderRightColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-color) - */ - mutable borderBottomColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-color) - */ - mutable borderLeftColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-color) - */ - mutable borderBlockStartColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-color) - */ - mutable borderBlockEndColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color) - */ - mutable borderInlineStartColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color) - */ - mutable borderInlineEndColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-color) - */ - mutable borderColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-color) - */ - mutable borderBlockColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-color) - */ - mutable borderInlineColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-style) - */ - mutable borderTopStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-style) - */ - mutable borderRightStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-style) - */ - mutable borderBottomStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-style) - */ - mutable borderLeftStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-style) - */ - mutable borderBlockStartStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-style) - */ - mutable borderBlockEndStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style) - */ - mutable borderInlineStartStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style) - */ - mutable borderInlineEndStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-style) - */ - mutable borderBlockStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-style) - */ - mutable borderInlineStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-width) - */ - mutable borderTopWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-width) - */ - mutable borderRightWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-width) - */ - mutable borderBottomWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-width) - */ - mutable borderLeftWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-width) - */ - mutable borderBlockStartWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-width) - */ - mutable borderBlockEndWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width) - */ - mutable borderInlineStartWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width) - */ - mutable borderInlineEndWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-width) - */ - mutable borderBlockWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-width) - */ - mutable borderInlineWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top) - */ - mutable borderTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right) - */ - mutable borderRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom) - */ - mutable borderBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left) - */ - mutable borderLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start) - */ - mutable borderBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end) - */ - mutable borderBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start) - */ - mutable borderInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end) - */ - mutable borderInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block) - */ - mutable borderBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline) - */ - mutable borderInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius) - */ - mutable borderTopLeftRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius) - */ - mutable borderTopRightRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) - */ - mutable borderBottomRightRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius) - */ - mutable borderBottomLeftRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius) - */ - mutable borderStartStartRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) - */ - mutable borderStartEndRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius) - */ - mutable borderEndStartRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) - */ - mutable borderEndEndRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-radius) - */ - mutable borderRadius: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-shadow) - */ - mutable boxShadow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin) - */ - mutable margin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-top) - */ - mutable paddingTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-right) - */ - mutable paddingRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-bottom) - */ - mutable paddingBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-left) - */ - mutable paddingLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding) - */ - mutable padding: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-before) - */ - mutable breakBefore: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-after) - */ - mutable breakAfter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-inside) - */ - mutable breakInside: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/orphans) - */ - mutable orphans: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/widows) - */ - mutable widows: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-decoration-break) - */ - mutable boxDecorationBreak: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-scheme) - */ - mutable colorScheme: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust) - */ - mutable forcedColorAdjust: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/print-color-adjust) - */ - mutable printColorAdjust: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color) - */ - mutable color: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/opacity) - */ - mutable opacity: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/content) - */ - mutable content: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/quotes) - */ - mutable quotes: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/order) - */ - mutable order: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/visibility) - */ - mutable visibility: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-direction) - */ - mutable flexDirection: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-wrap) - */ - mutable flexWrap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-flow) - */ - mutable flexFlow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex) - */ - mutable flex: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-grow) - */ - mutable flexGrow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-shrink) - */ - mutable flexShrink: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-basis) - */ - mutable flexBasis: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/position) - */ - mutable position: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/float) - */ - mutable float: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-columns) - */ - mutable gridTemplateColumns: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-rows) - */ - mutable gridTemplateRows: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow) - */ - mutable gridAutoFlow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-areas) - */ - mutable gridTemplateAreas: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template) - */ - mutable gridTemplate: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns) - */ - mutable gridAutoColumns: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows) - */ - mutable gridAutoRows: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid) - */ - mutable grid: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row-start) - */ - mutable gridRowStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column-start) - */ - mutable gridColumnStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row-end) - */ - mutable gridRowEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column-end) - */ - mutable gridColumnEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row) - */ - mutable gridRow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column) - */ - mutable gridColumn: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-area) - */ - mutable gridArea: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/object-position) - */ - mutable objectPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/image-rendering) - */ - mutable imageRendering: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/dominant-baseline) - */ - mutable dominantBaseline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/vertical-align) - */ - mutable verticalAlign: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/line-height) - */ - mutable lineHeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-image) - */ - mutable listStyleImage: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-type) - */ - mutable listStyleType: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-position) - */ - mutable listStylePosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style) - */ - mutable listStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-reset) - */ - mutable counterReset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-increment) - */ - mutable counterIncrement: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-set) - */ - mutable counterSet: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/block-size) - */ - mutable blockSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inline-size) - */ - mutable inlineSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-block-size) - */ - mutable minBlockSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-inline-size) - */ - mutable minInlineSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-block-size) - */ - mutable maxBlockSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-inline-size) - */ - mutable maxInlineSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block-start) - */ - mutable marginBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block-end) - */ - mutable marginBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start) - */ - mutable marginInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) - */ - mutable marginInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block) - */ - mutable marginBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline) - */ - mutable marginInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block-start) - */ - mutable paddingBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block-end) - */ - mutable paddingBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start) - */ - mutable paddingInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) - */ - mutable paddingInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block) - */ - mutable paddingBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline) - */ - mutable paddingInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-span) - */ - mutable columnSpan: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-width) - */ - mutable columnWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-count) - */ - mutable columnCount: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/columns) - */ - mutable columns: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-color) - */ - mutable columnRuleColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-style) - */ - mutable columnRuleStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-width) - */ - mutable columnRuleWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule) - */ - mutable columnRule: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-fill) - */ - mutable columnFill: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin) - */ - mutable overflowClipMargin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-overflow) - */ - mutable textOverflow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-x) - */ - mutable overflowX: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-y) - */ - mutable overflowY: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow) - */ - mutable overflow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-behavior) - */ - mutable scrollBehavior: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter) - */ - mutable scrollbarGutter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior) - */ - mutable overscrollBehavior: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x) - */ - mutable overscrollBehaviorX: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y) - */ - mutable overscrollBehaviorY: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline) - */ - mutable overscrollBehaviorInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block) - */ - mutable overscrollBehaviorBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clear) - */ - mutable clear: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page) - */ - mutable page: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block-start) - */ - mutable insetBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline-start) - */ - mutable insetInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block-end) - */ - mutable insetBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline-end) - */ - mutable insetInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block) - */ - mutable insetBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline) - */ - mutable insetInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset) - */ - mutable inset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ruby-position) - */ - mutable rubyPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ruby-align) - */ - mutable rubyAlign: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-anchor) - */ - mutable overflowAnchor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) - */ - mutable scrollSnapType: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding) - */ - mutable scrollPadding: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin) - */ - mutable scrollMargin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align) - */ - mutable scrollSnapAlign: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop) - */ - mutable scrollSnapStop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top) - */ - mutable scrollPaddingTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right) - */ - mutable scrollPaddingRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom) - */ - mutable scrollPaddingBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left) - */ - mutable scrollPaddingLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start) - */ - mutable scrollPaddingInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start) - */ - mutable scrollPaddingBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end) - */ - mutable scrollPaddingInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end) - */ - mutable scrollPaddingBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block) - */ - mutable scrollPaddingBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline) - */ - mutable scrollPaddingInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top) - */ - mutable scrollMarginTop: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right) - */ - mutable scrollMarginRight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom) - */ - mutable scrollMarginBottom: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left) - */ - mutable scrollMarginLeft: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start) - */ - mutable scrollMarginBlockStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start) - */ - mutable scrollMarginInlineStart: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end) - */ - mutable scrollMarginBlockEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end) - */ - mutable scrollMarginInlineEnd: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block) - */ - mutable scrollMarginBlock: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline) - */ - mutable scrollMarginInline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-color) - */ - mutable scrollbarColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-width) - */ - mutable scrollbarWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-outside) - */ - mutable shapeOutside: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold) - */ - mutable shapeImageThreshold: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-margin) - */ - mutable shapeMargin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/aspect-ratio) - */ - mutable aspectRatio: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width) - */ - mutable containIntrinsicWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height) - */ - mutable containIntrinsicHeight: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size) - */ - mutable containIntrinsicBlockSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size) - */ - mutable containIntrinsicInlineSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size) - */ - mutable containIntrinsicSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-sizing) - */ - mutable boxSizing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/table-layout) - */ - mutable tableLayout: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-collapse) - */ - mutable borderCollapse: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-spacing) - */ - mutable borderSpacing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/caption-side) - */ - mutable captionSide: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/empty-cells) - */ - mutable emptyCells: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/white-space) - */ - mutable whiteSpace: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/white-space-collapse) - */ - mutable whiteSpaceCollapse: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/tab-size) - */ - mutable tabSize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap-mode) - */ - mutable textWrapMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap-style) - */ - mutable textWrapStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap) - */ - mutable textWrap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/word-break) - */ - mutable wordBreak: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/line-break) - */ - mutable lineBreak: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/hyphens) - */ - mutable hyphens: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/hyphenate-character) - */ - mutable hyphenateCharacter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-wrap) - */ - mutable overflowWrap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-align) - */ - mutable textAlign: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-align-last) - */ - mutable textAlignLast: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/word-spacing) - */ - mutable wordSpacing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) - */ - mutable letterSpacing: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-indent) - */ - mutable textIndent: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-line) - */ - mutable textDecorationLine: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-style) - */ - mutable textDecorationStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-color) - */ - mutable textDecorationColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness) - */ - mutable textDecorationThickness: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration) - */ - mutable textDecoration: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-underline-position) - */ - mutable textUnderlinePosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-underline-offset) - */ - mutable textUnderlineOffset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink) - */ - mutable textDecorationSkipInk: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style) - */ - mutable textEmphasisStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color) - */ - mutable textEmphasisColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis) - */ - mutable textEmphasis: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position) - */ - mutable textEmphasisPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-shadow) - */ - mutable textShadow: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/translate) - */ - mutable translate: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/rotate) - */ - mutable rotate: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scale) - */ - mutable scale: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-style) - */ - mutable transformStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/perspective) - */ - mutable perspective: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/perspective-origin) - */ - mutable perspectiveOrigin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/backface-visibility) - */ - mutable backfaceVisibility: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform) - */ - mutable transform: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-origin) - */ - mutable transformOrigin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-box) - */ - mutable transformBox: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline) - */ - mutable outline: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-width) - */ - mutable outlineWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-style) - */ - mutable outlineStyle: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-color) - */ - mutable outlineColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-offset) - */ - mutable outlineOffset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/resize) - */ - mutable resize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cursor) - */ - mutable cursor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/caret-color) - */ - mutable caretColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/user-select) - */ - mutable userSelect: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/accent-color) - */ - mutable accentColor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/appearance) - */ - mutable appearance: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/will-change) - */ - mutable willChange: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/direction) - */ - mutable direction: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/unicode-bidi) - */ - mutable unicodeBidi: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/writing-mode) - */ - mutable writingMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-orientation) - */ - mutable textOrientation: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-combine-upright) - */ - mutable textCombineUpright: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill-rule) - */ - mutable fillRule: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill-opacity) - */ - mutable fillOpacity: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-width) - */ - mutable strokeWidth: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-linecap) - */ - mutable strokeLinecap: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin) - */ - mutable strokeLinejoin: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit) - */ - mutable strokeMiterlimit: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray) - */ - mutable strokeDasharray: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset) - */ - mutable strokeDashoffset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-opacity) - */ - mutable strokeOpacity: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/backdrop-filter) - */ - mutable backdropFilter: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-path) - */ - mutable offsetPath: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-distance) - */ - mutable offsetDistance: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-position) - */ - mutable offsetPosition: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-anchor) - */ - mutable offsetAnchor: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-rotate) - */ - mutable offsetRotate: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset) - */ - mutable offset: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) - */ - mutable cssFloat: string, -} - -type shadowRootMode = - | @as("closed") Closed - | @as("open") Open - -type customStateSet = {} - -/** -Node is an interface from which a number of WebApiDOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way. -[See Node on MDN](https://developer.mozilla.org/docs/Web/API/Node) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(Node) -type rec node = { - ...eventTarget, - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, -} - -/** -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. -[See Element on MDN](https://developer.mozilla.org/docs/Web/API/Element) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(Element) and element = { - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - Returns the namespace. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) - */ - namespaceURI: Null.t, - /** - Returns the namespace prefix. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) - */ - prefix: Null.t, - /** - Returns the local name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) - */ - localName: string, - /** - Returns the HTML-uppercased qualified name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) - */ - tagName: string, - /** - Returns the value of element's id content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) - */ - mutable id: string, - /** - Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) - */ - classList: domTokenList, - /** - Returns the value of element's slot content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) - */ - mutable slot: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) - */ - attributes: namedNodeMap, - /** - Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) - */ - shadowRoot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) - */ - part: domTokenList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) - */ - mutable scrollTop: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) - */ - mutable scrollLeft: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) - */ - scrollWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) - */ - scrollHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) - */ - clientTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) - */ - clientLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) - */ - clientWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) - */ - clientHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) - */ - currentCSSZoom: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) - */ - @throws(JsExn) - mutable outerHTML: string, - /** - Returns the child elements. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children) - */ - children: htmlCollection, - /** - Returns the first child that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild) - */ - firstElementChild: Null.t, - /** - Returns the last child that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/lastElementChild) - */ - lastElementChild: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/childElementCount) - */ - childElementCount: int, - /** - Returns the first preceding sibling that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/previousElementSibling) - */ - previousElementSibling: Null.t, - /** - Returns the first following sibling that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/nextElementSibling) - */ - nextElementSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/assignedSlot) - */ - assignedSlot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaAtomic) - */ - mutable ariaAtomic: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaAutoComplete) - */ - mutable ariaAutoComplete: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleLabel) - */ - mutable ariaBrailleLabel: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleRoleDescription) - */ - mutable ariaBrailleRoleDescription: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBusy) - */ - mutable ariaBusy: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaChecked) - */ - mutable ariaChecked: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColCount) - */ - mutable ariaColCount: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndex) - */ - mutable ariaColIndex: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndexText) - */ - mutable ariaColIndexText: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) - */ - mutable ariaColSpan: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) - */ - mutable ariaCurrent: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaDescription) - */ - mutable ariaDescription: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaDisabled) - */ - mutable ariaDisabled: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaExpanded) - */ - mutable ariaExpanded: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaHasPopup) - */ - mutable ariaHasPopup: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaHidden) - */ - mutable ariaHidden: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaKeyShortcuts) - */ - mutable ariaKeyShortcuts: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLabel) - */ - mutable ariaLabel: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLevel) - */ - mutable ariaLevel: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLive) - */ - mutable ariaLive: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaModal) - */ - mutable ariaModal: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiLine) - */ - mutable ariaMultiLine: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiSelectable) - */ - mutable ariaMultiSelectable: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaOrientation) - */ - mutable ariaOrientation: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPlaceholder) - */ - mutable ariaPlaceholder: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPosInSet) - */ - mutable ariaPosInSet: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPressed) - */ - mutable ariaPressed: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaReadOnly) - */ - mutable ariaReadOnly: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRequired) - */ - mutable ariaRequired: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRoleDescription) - */ - mutable ariaRoleDescription: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowCount) - */ - mutable ariaRowCount: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndex) - */ - mutable ariaRowIndex: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndexText) - */ - mutable ariaRowIndexText: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowSpan) - */ - mutable ariaRowSpan: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSelected) - */ - mutable ariaSelected: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSetSize) - */ - mutable ariaSetSize: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSort) - */ - mutable ariaSort: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMax) - */ - mutable ariaValueMax: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMin) - */ - mutable ariaValueMin: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueNow) - */ - mutable ariaValueNow: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueText) - */ - mutable ariaValueText: Null.t, -} - -/** -A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. -[See DocumentFragment on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(DocumentFragment) and documentFragment = { - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - Returns the child elements. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children) - */ - children: htmlCollection, - /** - Returns the first child that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild) - */ - firstElementChild: Null.t, - /** - Returns the last child that is an element, and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/lastElementChild) - */ - lastElementChild: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/childElementCount) - */ - childElementCount: int, -} - -/** -[See ShadowRoot on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(ShadowRoot) and shadowRoot = { - // Base properties from DocumentFragment - // End base properties from DocumentFragment - - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/mode) - */ - mode: shadowRootMode, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/delegatesFocus) - */ - delegatesFocus: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/slotAssignment) - */ - slotAssignment: domTreeSlotAssignmentMode, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/clonable) - */ - clonable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/serializable) - */ - serializable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/host) - */ - host: element, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/styleSheets) - */ - styleSheets: styleSheetList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/adoptedStyleSheets) - */ - @throws(JsExn) - mutable adoptedStyleSheets: array, - /** - Returns document's fullscreen element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/fullscreenElement) - */ - fullscreenElement: Null.t, - /** - Returns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document. - -For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document. - -Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/activeElement) - */ - activeElement: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/pictureInPictureElement) - */ - pictureInPictureElement: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/pointerLockElement) - */ - pointerLockElement: Null.t, -} - -/** -Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. -[See HTMLElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(HTMLElement) and htmlElement = { - // Base properties from Element - /** - Returns the namespace. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) - */ - namespaceURI: Null.t, - /** - Returns the namespace prefix. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) - */ - prefix: Null.t, - /** - Returns the local name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) - */ - localName: string, - /** - Returns the HTML-uppercased qualified name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) - */ - tagName: string, - /** - Returns the value of element's id content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) - */ - mutable id: string, - /** - Returns the value of element's class content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) - */ - mutable className: string, - /** - Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) - */ - classList: domTokenList, - /** - Returns the value of element's slot content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) - */ - mutable slot: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) - */ - attributes: namedNodeMap, - /** - Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) - */ - shadowRoot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) - */ - part: domTokenList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) - */ - mutable scrollTop: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) - */ - mutable scrollLeft: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) - */ - scrollWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) - */ - scrollHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) - */ - clientTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) - */ - clientLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) - */ - clientWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) - */ - clientHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) - */ - currentCSSZoom: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) - */ - @throws(JsExn) - mutable outerHTML: string, - // End base properties from Element - - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) - */ - mutable title: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) - */ - mutable lang: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) - */ - mutable translate: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) - */ - mutable dir: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) - */ - mutable inert: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) - */ - mutable accessKey: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) - */ - accessKeyLabel: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) - */ - mutable draggable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) - */ - mutable spellcheck: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) - */ - mutable autocapitalize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) - */ - mutable innerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) - */ - mutable outerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) - */ - mutable popover: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) - */ - offsetParent: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) - */ - offsetTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) - */ - offsetLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) - */ - offsetWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) - */ - offsetHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) - */ - style: cssStyleDeclaration, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) - */ - attributeStyleMap: stylePropertyMap, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) - */ - mutable contentEditable: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/enterKeyHint) - */ - mutable enterKeyHint: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable) - */ - isContentEditable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inputMode) - */ - mutable inputMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) - */ - dataset: domStringMap, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce) - */ - mutable nonce?: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) - */ - mutable autofocus: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) - */ - mutable tabIndex: int, -} - -/** -A element in the WebApiDOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. -[See HTMLFormElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(HTMLFormElement) and htmlFormElement = { - // Base properties from HTMLElement - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) - */ - mutable title: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) - */ - mutable lang: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) - */ - mutable translate: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) - */ - mutable dir: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) - */ - mutable inert: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) - */ - mutable accessKey: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) - */ - accessKeyLabel: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) - */ - mutable draggable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) - */ - mutable spellcheck: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) - */ - mutable autocapitalize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) - */ - mutable innerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) - */ - mutable outerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) - */ - mutable popover: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) - */ - offsetParent: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) - */ - offsetTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) - */ - offsetLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) - */ - offsetWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) - */ - offsetHeight: int, - // End base properties from HTMLElement - - // Base properties from Element - /** - Returns the namespace. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) - */ - namespaceURI: Null.t, - /** - Returns the namespace prefix. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) - */ - prefix: Null.t, - /** - Returns the local name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) - */ - localName: string, - /** - Returns the HTML-uppercased qualified name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) - */ - tagName: string, - /** - Returns the value of element's id content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) - */ - mutable id: string, - /** - Returns the value of element's class content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) - */ - mutable className: string, - /** - Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) - */ - classList: domTokenList, - /** - Returns the value of element's slot content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) - */ - mutable slot: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) - */ - attributes: namedNodeMap, - /** - Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) - */ - shadowRoot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) - */ - part: domTokenList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) - */ - mutable scrollTop: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) - */ - mutable scrollLeft: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) - */ - scrollWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) - */ - scrollHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) - */ - clientTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) - */ - clientLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) - */ - clientWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) - */ - clientHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) - */ - currentCSSZoom: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) - */ - @throws(JsExn) - mutable outerHTML: string, - // End base properties from Element - - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/acceptCharset) - */ - mutable acceptCharset: string, - /** - Sets or retrieves the WebApiURL to which the form content is sent for processing. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/action) - */ - mutable action: string, - /** - Specifies whether autocomplete is applied to an editable text field. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/autocomplete) - */ - mutable autocomplete: autoFillBase, - /** - Sets or retrieves the encoding type for the form. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/enctype) - */ - mutable enctype: string, - /** - Sets or retrieves the MIME encoding for the form. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/encoding) - */ - mutable encoding: string, - /** - Sets or retrieves how to send the form data to the server. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/method) - */ - mutable method: string, - /** - Sets or retrieves the name of the object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/name) - */ - mutable name: string, - /** - Sets or retrieves the window or frame at which to target content. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/target) - */ - mutable target: string, - /** - Retrieves a collection, in source order, of all controls in a given form. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/elements) - */ - elements: htmlFormControlsCollection, - /** - Sets or retrieves the number of objects in a collection. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/length) - */ - length: int, -} - -@editor.completeFrom(HTMLFormControlsCollection) -and htmlFormControlsCollection = { - length: int, -} - -@editor.completeFrom(HTMLSlotElement) -and htmlSlotElement = { - // Base properties from Element - /** - Returns the namespace. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) - */ - namespaceURI: Null.t, - /** - Returns the namespace prefix. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) - */ - prefix: Null.t, - /** - Returns the local name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) - */ - localName: string, - /** - Returns the HTML-uppercased qualified name. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) - */ - tagName: string, - /** - Returns the value of element's id content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) - */ - mutable id: string, - /** - Returns the value of element's class content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) - */ - mutable className: string, - /** - Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) - */ - classList: domTokenList, - /** - Returns the value of element's slot content attribute. Can be set to change it. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) - */ - mutable slot: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) - */ - attributes: namedNodeMap, - /** - Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) - */ - shadowRoot: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) - */ - part: domTokenList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) - */ - mutable scrollTop: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) - */ - mutable scrollLeft: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) - */ - scrollWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) - */ - scrollHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) - */ - clientTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) - */ - clientLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) - */ - clientWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) - */ - clientHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) - */ - currentCSSZoom: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) - */ - @throws(JsExn) - mutable innerHTML: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) - */ - @throws(JsExn) - mutable outerHTML: string, - // End base properties from Element - - // Base properties from Node - /** - Returns the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) - */ - nodeType: int, - /** - Returns a string appropriate for the type of node. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) - */ - nodeName: string, - /** - Returns node's node document's document base URL. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) - */ - baseURI: string, - /** - Returns true if node is connected and false otherwise. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) - */ - isConnected: bool, - /** - Returns the node document. Returns null for documents. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) - */ - ownerDocument: Null.t, - /** - Returns the parent. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - */ - parentNode: Null.t, - /** - Returns the parent element. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) - */ - parentElement: Null.t, - /** - Returns the children. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) - */ - childNodes: nodeList, - /** - Returns the first child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - */ - firstChild: Null.t, - /** - Returns the last child. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) - */ - lastChild: Null.t, - /** - Returns the previous sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) - */ - previousSibling: Null.t, - /** - Returns the next sibling. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - */ - nextSibling: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) - */ - mutable nodeValue: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) - */ - mutable textContent: Null.t, - // End base properties from Node - - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) - */ - mutable title: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) - */ - mutable lang: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) - */ - mutable translate: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) - */ - mutable dir: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) - */ - mutable inert: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) - */ - mutable accessKey: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) - */ - accessKeyLabel: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) - */ - mutable draggable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) - */ - mutable spellcheck: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) - */ - mutable autocapitalize: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) - */ - mutable innerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) - */ - mutable outerText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) - */ - mutable popover: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) - */ - offsetParent: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) - */ - offsetTop: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) - */ - offsetLeft: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) - */ - offsetWidth: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) - */ - offsetHeight: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) - */ - style: cssStyleDeclaration, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) - */ - attributeStyleMap: stylePropertyMap, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) - */ - mutable contentEditable: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/enterKeyHint) - */ - mutable enterKeyHint: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable) - */ - isContentEditable: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inputMode) - */ - mutable inputMode: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) - */ - dataset: domStringMap, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce) - */ - mutable nonce?: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) - */ - mutable autofocus: bool, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) - */ - mutable tabIndex: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSlotElement/name) - */ - mutable name: string, -} - -@editor.completeFrom(ElementInternals) -and elementInternals = { - shadowRoot: Null.t, - form: Null.t, - willValidate: bool, - validity: validityState, - validationMessage: string, - labels: nodeList, - states: customStateSet, - mutable ariaAtomic: Null.t, - mutable ariaAutoComplete: Null.t, - mutable ariaBrailleLabel: Null.t, - mutable ariaBrailleRoleDescription: Null.t, - mutable ariaBusy: Null.t, - mutable ariaChecked: Null.t, - mutable ariaColCount: Null.t, - mutable ariaColIndex: Null.t, - mutable ariaColIndexText: Null.t, - mutable ariaColSpan: Null.t, - mutable ariaCurrent: Null.t, - mutable ariaDescription: Null.t, - mutable ariaDisabled: Null.t, - mutable ariaExpanded: Null.t, - mutable ariaHasPopup: Null.t, - mutable ariaHidden: Null.t, - mutable ariaKeyShortcuts: Null.t, - mutable ariaLabel: Null.t, - mutable ariaLevel: Null.t, - mutable ariaLive: Null.t, - mutable ariaModal: Null.t, - mutable ariaMultiLine: Null.t, - mutable ariaMultiSelectable: Null.t, - mutable ariaOrientation: Null.t, - mutable ariaPlaceholder: Null.t, - mutable ariaPosInSet: Null.t, - mutable ariaPressed: Null.t, - mutable ariaReadOnly: Null.t, - mutable ariaRequired: Null.t, - mutable ariaRoleDescription: Null.t, - mutable ariaRowCount: Null.t, - mutable ariaRowIndex: Null.t, - mutable ariaRowIndexText: Null.t, - mutable ariaRowSpan: Null.t, - mutable ariaSelected: Null.t, - mutable ariaSetSize: Null.t, - mutable ariaSort: Null.t, - mutable ariaValueMax: Null.t, - mutable ariaValueMin: Null.t, - mutable ariaValueNow: Null.t, - mutable ariaValueText: Null.t, -} diff --git a/src/cssom-types/CSSOMTypes.res b/src/cssom-types/CSSOMTypes.res new file mode 100644 index 00000000..06ef8f77 --- /dev/null +++ b/src/cssom-types/CSSOMTypes.res @@ -0,0 +1,1863 @@ +@@warning("-30") + +/** +[See StylePropertyMapReadOnly on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) +*/ +@editor.completeFrom(StylePropertyMapReadOnly) +type stylePropertyMapReadOnly = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size) + */ + size: int, +} + +/** +[See StylePropertyMap on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap) +*/ +@editor.completeFrom(StylePropertyMap) +type stylePropertyMap = private { + ...stylePropertyMapReadOnly, +} + +@editor.completeFrom(MediaList) +type mediaList = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/mediaText) + */ + mutable mediaText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/length) + */ + length: int, +} + +/** +A list of StyleSheet. +[See StyleSheetList on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList) +*/ +@editor.completeFrom(StyleSheetList) +type styleSheetList = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/length) + */ + length: int, +} + +/** +A single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. +[See StyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet) +*/ +@editor.completeFrom(StyleSheet) +type rec styleSheet = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) + */ + @as("type") + type_: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) + */ + href: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) + */ + ownerNode: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) + */ + parentStyleSheet: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) + */ + title: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) + */ + media: mediaList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) + */ + mutable disabled: bool, +} + +/** +A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. +[See CSSStyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(CSSStyleSheet) and cssStyleSheet = { + // Base properties from StyleSheet + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) + */ + @as("type") + type_: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) + */ + href: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) + */ + ownerNode: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) + */ + parentStyleSheet: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) + */ + title: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) + */ + media: mediaList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) + */ + mutable disabled: bool, + // End base properties from StyleSheet + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/ownerRule) + */ + ownerRule: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/cssRules) + */ + cssRules: cssRuleList, +} + +/** +A single CSS rule. There are several types of rules, listed in the Type constants section below. +[See CSSRule on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule) +*/ +and cssRule = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/cssText) + */ + mutable cssText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentRule) + */ + parentRule: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentStyleSheet) + */ + parentStyleSheet: Null.t, +} + +/** +A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. +[See CSSRuleList on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList) +*/ +@editor.completeFrom(CSSRuleList) and cssRuleList = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/length) + */ + length: int, +} + +@editor.completeFrom(CSSStyleDeclaration) +type cssStyleDeclaration = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText) + */ + mutable cssText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/length) + */ + length: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule) + */ + parentRule: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cx) + */ + mutable cx: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cy) + */ + mutable cy: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/r) + */ + mutable r: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/rx) + */ + mutable rx: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ry) + */ + mutable ry: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/x) + */ + mutable x: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/y) + */ + mutable y: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/vector-effect) + */ + mutable vectorEffect: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/d) + */ + mutable d: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-anchor) + */ + mutable textAnchor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill) + */ + mutable fill: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke) + */ + mutable stroke: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-start) + */ + mutable markerStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-mid) + */ + mutable markerMid: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker-end) + */ + mutable markerEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/marker) + */ + mutable marker: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/paint-order) + */ + mutable paintOrder: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-interpolation) + */ + mutable colorInterpolation: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-rendering) + */ + mutable shapeRendering: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-rendering) + */ + mutable textRendering: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/pointer-events) + */ + mutable pointerEvents: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stop-color) + */ + mutable stopColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stop-opacity) + */ + mutable stopOpacity: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color) + */ + mutable webkitTextFillColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color) + */ + mutable webkitTextStrokeColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width) + */ + mutable webkitTextStrokeWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke) + */ + mutable webkitTextStroke: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/touch-action) + */ + mutable touchAction: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/position-area) + */ + mutable positionArea: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/top) + */ + mutable top: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/left) + */ + mutable left: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/right) + */ + mutable right: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/bottom) + */ + mutable bottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-self) + */ + mutable justifySelf: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-self) + */ + mutable alignSelf: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-items) + */ + mutable justifyItems: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-items) + */ + mutable alignItems: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/width) + */ + mutable width: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/height) + */ + mutable height: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-width) + */ + mutable minWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-height) + */ + mutable minHeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-width) + */ + mutable maxWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-height) + */ + mutable maxHeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-top) + */ + mutable marginTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-left) + */ + mutable marginLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-right) + */ + mutable marginRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-bottom) + */ + mutable marginBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-duration) + */ + mutable animationDuration: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-composition) + */ + mutable animationComposition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-name) + */ + mutable animationName: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-timing-function) + */ + mutable animationTimingFunction: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count) + */ + mutable animationIterationCount: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-direction) + */ + mutable animationDirection: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-play-state) + */ + mutable animationPlayState: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-delay) + */ + mutable animationDelay: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode) + */ + mutable animationFillMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/animation) + */ + mutable animation: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/all) + */ + mutable all: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container-type) + */ + mutable containerType: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container-name) + */ + mutable containerName: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/container) + */ + mutable container: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain) + */ + mutable contain: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/content-visibility) + */ + mutable contentVisibility: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-family) + */ + mutable fontFamily: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-weight) + */ + mutable fontWeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-style) + */ + mutable fontStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-size) + */ + mutable fontSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-size-adjust) + */ + mutable fontSizeAdjust: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font) + */ + mutable font: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight) + */ + mutable fontSynthesisWeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style) + */ + mutable fontSynthesisStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps) + */ + mutable fontSynthesisSmallCaps: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-synthesis) + */ + mutable fontSynthesis: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-kerning) + */ + mutable fontKerning: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures) + */ + mutable fontVariantLigatures: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-position) + */ + mutable fontVariantPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-caps) + */ + mutable fontVariantCaps: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric) + */ + mutable fontVariantNumeric: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates) + */ + mutable fontVariantAlternates: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian) + */ + mutable fontVariantEastAsian: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variant) + */ + mutable fontVariant: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-feature-settings) + */ + mutable fontFeatureSettings: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing) + */ + mutable fontOpticalSizing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-variation-settings) + */ + mutable fontVariationSettings: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-palette) + */ + mutable fontPalette: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/font-stretch) + */ + mutable fontStretch: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/object-fit) + */ + mutable objectFit: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clip-path) + */ + mutable clipPath: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clip-rule) + */ + mutable clipRule: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-image) + */ + mutable maskImage: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-mode) + */ + mutable maskMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-repeat) + */ + mutable maskRepeat: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-position) + */ + mutable maskPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-clip) + */ + mutable maskClip: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-origin) + */ + mutable maskOrigin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-size) + */ + mutable maskSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-composite) + */ + mutable maskComposite: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask) + */ + mutable mask: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mask-type) + */ + mutable maskType: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-behavior) + */ + mutable transitionBehavior: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-property) + */ + mutable transitionProperty: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-duration) + */ + mutable transitionDuration: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-timing-function) + */ + mutable transitionTimingFunction: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition-delay) + */ + mutable transitionDelay: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transition) + */ + mutable transition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/view-transition-name) + */ + mutable viewTransitionName: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/zoom) + */ + mutable zoom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/filter) + */ + mutable filter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-interpolation-filters) + */ + mutable colorInterpolationFilters: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/display) + */ + mutable display: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-transform) + */ + mutable textTransform: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/math-style) + */ + mutable mathStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/math-depth) + */ + mutable mathDepth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/z-index) + */ + mutable zIndex: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-before) + */ + mutable pageBreakBefore: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-after) + */ + mutable pageBreakAfter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page-break-inside) + */ + mutable pageBreakInside: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode) + */ + mutable mixBlendMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/isolation) + */ + mutable isolation: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-blend-mode) + */ + mutable backgroundBlendMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/align-content) + */ + mutable alignContent: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/justify-content) + */ + mutable justifyContent: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-content) + */ + mutable placeContent: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-self) + */ + mutable placeSelf: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/place-items) + */ + mutable placeItems: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/row-gap) + */ + mutable rowGap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-gap) + */ + mutable columnGap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/gap) + */ + mutable gap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-repeat) + */ + mutable backgroundRepeat: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position) + */ + mutable backgroundPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position-x) + */ + mutable backgroundPositionX: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-position-y) + */ + mutable backgroundPositionY: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-clip) + */ + mutable backgroundClip: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-color) + */ + mutable backgroundColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-image) + */ + mutable backgroundImage: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-attachment) + */ + mutable backgroundAttachment: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-origin) + */ + mutable backgroundOrigin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background-size) + */ + mutable backgroundSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/background) + */ + mutable background: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-style) + */ + mutable borderStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-width) + */ + mutable borderWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border) + */ + mutable border: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-source) + */ + mutable borderImageSource: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-slice) + */ + mutable borderImageSlice: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-width) + */ + mutable borderImageWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-outset) + */ + mutable borderImageOutset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image-repeat) + */ + mutable borderImageRepeat: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-image) + */ + mutable borderImage: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-color) + */ + mutable borderTopColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-color) + */ + mutable borderRightColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-color) + */ + mutable borderBottomColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-color) + */ + mutable borderLeftColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-color) + */ + mutable borderBlockStartColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-color) + */ + mutable borderBlockEndColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color) + */ + mutable borderInlineStartColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color) + */ + mutable borderInlineEndColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-color) + */ + mutable borderColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-color) + */ + mutable borderBlockColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-color) + */ + mutable borderInlineColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-style) + */ + mutable borderTopStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-style) + */ + mutable borderRightStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-style) + */ + mutable borderBottomStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-style) + */ + mutable borderLeftStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-style) + */ + mutable borderBlockStartStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-style) + */ + mutable borderBlockEndStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style) + */ + mutable borderInlineStartStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style) + */ + mutable borderInlineEndStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-style) + */ + mutable borderBlockStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-style) + */ + mutable borderInlineStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-width) + */ + mutable borderTopWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right-width) + */ + mutable borderRightWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-width) + */ + mutable borderBottomWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left-width) + */ + mutable borderLeftWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start-width) + */ + mutable borderBlockStartWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end-width) + */ + mutable borderBlockEndWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width) + */ + mutable borderInlineStartWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width) + */ + mutable borderInlineEndWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-width) + */ + mutable borderBlockWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-width) + */ + mutable borderInlineWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top) + */ + mutable borderTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-right) + */ + mutable borderRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom) + */ + mutable borderBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-left) + */ + mutable borderLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-start) + */ + mutable borderBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block-end) + */ + mutable borderBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-start) + */ + mutable borderInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline-end) + */ + mutable borderInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-block) + */ + mutable borderBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-inline) + */ + mutable borderInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius) + */ + mutable borderTopLeftRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius) + */ + mutable borderTopRightRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) + */ + mutable borderBottomRightRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius) + */ + mutable borderBottomLeftRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius) + */ + mutable borderStartStartRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) + */ + mutable borderStartEndRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius) + */ + mutable borderEndStartRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) + */ + mutable borderEndEndRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-radius) + */ + mutable borderRadius: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-shadow) + */ + mutable boxShadow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin) + */ + mutable margin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-top) + */ + mutable paddingTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-right) + */ + mutable paddingRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-bottom) + */ + mutable paddingBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-left) + */ + mutable paddingLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding) + */ + mutable padding: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-before) + */ + mutable breakBefore: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-after) + */ + mutable breakAfter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/break-inside) + */ + mutable breakInside: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/orphans) + */ + mutable orphans: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/widows) + */ + mutable widows: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-decoration-break) + */ + mutable boxDecorationBreak: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color-scheme) + */ + mutable colorScheme: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust) + */ + mutable forcedColorAdjust: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/print-color-adjust) + */ + mutable printColorAdjust: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/color) + */ + mutable color: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/opacity) + */ + mutable opacity: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/content) + */ + mutable content: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/quotes) + */ + mutable quotes: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/order) + */ + mutable order: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/visibility) + */ + mutable visibility: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-direction) + */ + mutable flexDirection: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-wrap) + */ + mutable flexWrap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-flow) + */ + mutable flexFlow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex) + */ + mutable flex: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-grow) + */ + mutable flexGrow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-shrink) + */ + mutable flexShrink: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/flex-basis) + */ + mutable flexBasis: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/position) + */ + mutable position: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/float) + */ + mutable float: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-columns) + */ + mutable gridTemplateColumns: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-rows) + */ + mutable gridTemplateRows: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow) + */ + mutable gridAutoFlow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template-areas) + */ + mutable gridTemplateAreas: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-template) + */ + mutable gridTemplate: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns) + */ + mutable gridAutoColumns: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows) + */ + mutable gridAutoRows: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid) + */ + mutable grid: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row-start) + */ + mutable gridRowStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column-start) + */ + mutable gridColumnStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row-end) + */ + mutable gridRowEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column-end) + */ + mutable gridColumnEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-row) + */ + mutable gridRow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-column) + */ + mutable gridColumn: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/grid-area) + */ + mutable gridArea: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/object-position) + */ + mutable objectPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/image-rendering) + */ + mutable imageRendering: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/dominant-baseline) + */ + mutable dominantBaseline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/vertical-align) + */ + mutable verticalAlign: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/line-height) + */ + mutable lineHeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-image) + */ + mutable listStyleImage: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-type) + */ + mutable listStyleType: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style-position) + */ + mutable listStylePosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/list-style) + */ + mutable listStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-reset) + */ + mutable counterReset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-increment) + */ + mutable counterIncrement: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/counter-set) + */ + mutable counterSet: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/block-size) + */ + mutable blockSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inline-size) + */ + mutable inlineSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-block-size) + */ + mutable minBlockSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/min-inline-size) + */ + mutable minInlineSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-block-size) + */ + mutable maxBlockSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/max-inline-size) + */ + mutable maxInlineSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block-start) + */ + mutable marginBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block-end) + */ + mutable marginBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start) + */ + mutable marginInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) + */ + mutable marginInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-block) + */ + mutable marginBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/margin-inline) + */ + mutable marginInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block-start) + */ + mutable paddingBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block-end) + */ + mutable paddingBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start) + */ + mutable paddingInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) + */ + mutable paddingInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-block) + */ + mutable paddingBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/padding-inline) + */ + mutable paddingInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-span) + */ + mutable columnSpan: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-width) + */ + mutable columnWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-count) + */ + mutable columnCount: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/columns) + */ + mutable columns: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-color) + */ + mutable columnRuleColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-style) + */ + mutable columnRuleStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule-width) + */ + mutable columnRuleWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-rule) + */ + mutable columnRule: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/column-fill) + */ + mutable columnFill: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin) + */ + mutable overflowClipMargin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-overflow) + */ + mutable textOverflow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-x) + */ + mutable overflowX: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-y) + */ + mutable overflowY: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow) + */ + mutable overflow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-behavior) + */ + mutable scrollBehavior: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter) + */ + mutable scrollbarGutter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior) + */ + mutable overscrollBehavior: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x) + */ + mutable overscrollBehaviorX: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y) + */ + mutable overscrollBehaviorY: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline) + */ + mutable overscrollBehaviorInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block) + */ + mutable overscrollBehaviorBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/clear) + */ + mutable clear: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/page) + */ + mutable page: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block-start) + */ + mutable insetBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline-start) + */ + mutable insetInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block-end) + */ + mutable insetBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline-end) + */ + mutable insetInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-block) + */ + mutable insetBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset-inline) + */ + mutable insetInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/inset) + */ + mutable inset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ruby-position) + */ + mutable rubyPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/ruby-align) + */ + mutable rubyAlign: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-anchor) + */ + mutable overflowAnchor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) + */ + mutable scrollSnapType: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding) + */ + mutable scrollPadding: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin) + */ + mutable scrollMargin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align) + */ + mutable scrollSnapAlign: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop) + */ + mutable scrollSnapStop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top) + */ + mutable scrollPaddingTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right) + */ + mutable scrollPaddingRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom) + */ + mutable scrollPaddingBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left) + */ + mutable scrollPaddingLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start) + */ + mutable scrollPaddingInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start) + */ + mutable scrollPaddingBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end) + */ + mutable scrollPaddingInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end) + */ + mutable scrollPaddingBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block) + */ + mutable scrollPaddingBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline) + */ + mutable scrollPaddingInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top) + */ + mutable scrollMarginTop: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right) + */ + mutable scrollMarginRight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom) + */ + mutable scrollMarginBottom: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left) + */ + mutable scrollMarginLeft: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start) + */ + mutable scrollMarginBlockStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start) + */ + mutable scrollMarginInlineStart: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end) + */ + mutable scrollMarginBlockEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end) + */ + mutable scrollMarginInlineEnd: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block) + */ + mutable scrollMarginBlock: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline) + */ + mutable scrollMarginInline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-color) + */ + mutable scrollbarColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scrollbar-width) + */ + mutable scrollbarWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-outside) + */ + mutable shapeOutside: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold) + */ + mutable shapeImageThreshold: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/shape-margin) + */ + mutable shapeMargin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/aspect-ratio) + */ + mutable aspectRatio: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width) + */ + mutable containIntrinsicWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height) + */ + mutable containIntrinsicHeight: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size) + */ + mutable containIntrinsicBlockSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size) + */ + mutable containIntrinsicInlineSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size) + */ + mutable containIntrinsicSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/box-sizing) + */ + mutable boxSizing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/table-layout) + */ + mutable tableLayout: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-collapse) + */ + mutable borderCollapse: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/border-spacing) + */ + mutable borderSpacing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/caption-side) + */ + mutable captionSide: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/empty-cells) + */ + mutable emptyCells: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/white-space) + */ + mutable whiteSpace: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/white-space-collapse) + */ + mutable whiteSpaceCollapse: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/tab-size) + */ + mutable tabSize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap-mode) + */ + mutable textWrapMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap-style) + */ + mutable textWrapStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-wrap) + */ + mutable textWrap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/word-break) + */ + mutable wordBreak: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/line-break) + */ + mutable lineBreak: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/hyphens) + */ + mutable hyphens: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/hyphenate-character) + */ + mutable hyphenateCharacter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/overflow-wrap) + */ + mutable overflowWrap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-align) + */ + mutable textAlign: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-align-last) + */ + mutable textAlignLast: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/word-spacing) + */ + mutable wordSpacing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) + */ + mutable letterSpacing: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-indent) + */ + mutable textIndent: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-line) + */ + mutable textDecorationLine: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-style) + */ + mutable textDecorationStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-color) + */ + mutable textDecorationColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness) + */ + mutable textDecorationThickness: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration) + */ + mutable textDecoration: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-underline-position) + */ + mutable textUnderlinePosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-underline-offset) + */ + mutable textUnderlineOffset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink) + */ + mutable textDecorationSkipInk: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style) + */ + mutable textEmphasisStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color) + */ + mutable textEmphasisColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis) + */ + mutable textEmphasis: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position) + */ + mutable textEmphasisPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-shadow) + */ + mutable textShadow: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/translate) + */ + mutable translate: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/rotate) + */ + mutable rotate: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/scale) + */ + mutable scale: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-style) + */ + mutable transformStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/perspective) + */ + mutable perspective: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/perspective-origin) + */ + mutable perspectiveOrigin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/backface-visibility) + */ + mutable backfaceVisibility: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform) + */ + mutable transform: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-origin) + */ + mutable transformOrigin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/transform-box) + */ + mutable transformBox: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline) + */ + mutable outline: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-width) + */ + mutable outlineWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-style) + */ + mutable outlineStyle: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-color) + */ + mutable outlineColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/outline-offset) + */ + mutable outlineOffset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/resize) + */ + mutable resize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cursor) + */ + mutable cursor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/caret-color) + */ + mutable caretColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/user-select) + */ + mutable userSelect: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/accent-color) + */ + mutable accentColor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/appearance) + */ + mutable appearance: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/will-change) + */ + mutable willChange: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/direction) + */ + mutable direction: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/unicode-bidi) + */ + mutable unicodeBidi: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/writing-mode) + */ + mutable writingMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-orientation) + */ + mutable textOrientation: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/text-combine-upright) + */ + mutable textCombineUpright: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill-rule) + */ + mutable fillRule: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/fill-opacity) + */ + mutable fillOpacity: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-width) + */ + mutable strokeWidth: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-linecap) + */ + mutable strokeLinecap: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin) + */ + mutable strokeLinejoin: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit) + */ + mutable strokeMiterlimit: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray) + */ + mutable strokeDasharray: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset) + */ + mutable strokeDashoffset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/stroke-opacity) + */ + mutable strokeOpacity: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/backdrop-filter) + */ + mutable backdropFilter: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-path) + */ + mutable offsetPath: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-distance) + */ + mutable offsetDistance: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-position) + */ + mutable offsetPosition: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-anchor) + */ + mutable offsetAnchor: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset-rotate) + */ + mutable offsetRotate: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/offset) + */ + mutable offset: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) + */ + mutable cssFloat: string, +} diff --git a/src/cssom/CSSStyleDeclaration.res b/src/cssom/CSSStyleDeclaration.res index 7bde769f..ba222b7c 100644 --- a/src/cssom/CSSStyleDeclaration.res +++ b/src/cssom/CSSStyleDeclaration.res @@ -1,5 +1,5 @@ @editor.completeFrom(CSSStyleDeclaration) -type t = DOM.cssStyleDeclaration = {...DOM.cssStyleDeclaration} +type t = CSSOMTypes.cssStyleDeclaration = {...CSSOMTypes.cssStyleDeclaration} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/item) diff --git a/src/cssom/MediaList.res b/src/cssom/MediaList.res index a903868c..6a23790a 100644 --- a/src/cssom/MediaList.res +++ b/src/cssom/MediaList.res @@ -1,5 +1,5 @@ @editor.completeFrom(MediaList) -type t = DOM.mediaList = {...DOM.mediaList} +type t = CSSOMTypes.mediaList = {...CSSOMTypes.mediaList} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/item) diff --git a/src/cssom/StylePropertyMap.res b/src/cssom/StylePropertyMap.res index 7ce3744b..29c5f833 100644 --- a/src/cssom/StylePropertyMap.res +++ b/src/cssom/StylePropertyMap.res @@ -2,7 +2,7 @@ [See StylePropertyMap on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap) */ @editor.completeFrom(StylePropertyMap) -type t = DOM.stylePropertyMap = private {...DOM.stylePropertyMap} +type t = CSSOMTypes.stylePropertyMap = private {...CSSOMTypes.stylePropertyMap} external asStylePropertyMapReadOnly: t => StylePropertyMapReadOnly.t = "%identity" diff --git a/src/cssom/StylePropertyMapReadOnly.res b/src/cssom/StylePropertyMapReadOnly.res index 1f2e5fba..fec74e31 100644 --- a/src/cssom/StylePropertyMapReadOnly.res +++ b/src/cssom/StylePropertyMapReadOnly.res @@ -2,7 +2,7 @@ [See StylePropertyMapReadOnly on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) */ @editor.completeFrom(StylePropertyMapReadOnly) -type t = DOM.stylePropertyMapReadOnly = private {...DOM.stylePropertyMapReadOnly} +type t = CSSOMTypes.stylePropertyMapReadOnly = private {...CSSOMTypes.stylePropertyMapReadOnly} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll) diff --git a/src/cssom/StyleSheet.res b/src/cssom/StyleSheet.res index 011518f8..f7017457 100644 --- a/src/cssom/StyleSheet.res +++ b/src/cssom/StyleSheet.res @@ -1,15 +1,15 @@ @@warning("-30") @editor.completeFrom(StyleSheet) -type t = DOM.styleSheet = {...DOM.styleSheet} +type t = CSSOMTypes.styleSheet = {...CSSOMTypes.styleSheet} @editor.completeFrom(CSSStyleSheet) -type cssStyleSheet = DOM.cssStyleSheet = {...DOM.cssStyleSheet} +type cssStyleSheet = CSSOMTypes.cssStyleSheet = {...CSSOMTypes.cssStyleSheet} -type cssRule = DOM.cssRule = {...DOM.cssRule} +type cssRule = CSSOMTypes.cssRule = {...CSSOMTypes.cssRule} @editor.completeFrom(CSSRuleList) -type cssRuleList = DOM.cssRuleList = private {...DOM.cssRuleList} +type cssRuleList = CSSOMTypes.cssRuleList = private {...CSSOMTypes.cssRuleList} type init = { mutable baseURL?: string, diff --git a/src/cssom/StyleSheetList.res b/src/cssom/StyleSheetList.res index bb9ff3c9..533d09bd 100644 --- a/src/cssom/StyleSheetList.res +++ b/src/cssom/StyleSheetList.res @@ -3,7 +3,7 @@ A list of StyleSheet. [See StyleSheetList on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList) */ @editor.completeFrom(StyleSheetList) -type t = DOM.styleSheetList = private {...DOM.styleSheetList} +type t = CSSOMTypes.styleSheetList = private {...CSSOMTypes.styleSheetList} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/item) diff --git a/src/dom-nodes/DOMTree.res b/src/dom-nodes/DOMTree.res deleted file mode 100644 index 677dff14..00000000 --- a/src/dom-nodes/DOMTree.res +++ /dev/null @@ -1,40 +0,0 @@ -@@warning("-30") - -type shadowRootMode = DOM.shadowRootMode = - | @as("closed") Closed - | @as("open") Open - -type slotAssignmentMode = DOM.domTreeSlotAssignmentMode = - | @as("manual") Manual - | @as("named") Named - -type customStateSet = DOM.customStateSet = {...DOM.customStateSet} - -@editor.completeFrom(Node) -type node = DOM.node = {...DOM.node} - -@editor.completeFrom(Element) -type element = DOM.element = {...DOM.element} - -@editor.completeFrom(DocumentFragment) -type documentFragment = DOM.documentFragment = {...DOM.documentFragment} - -@editor.completeFrom(ShadowRoot) -type shadowRoot = DOM.shadowRoot = {...DOM.shadowRoot} - -@editor.completeFrom(HTMLElement) -type htmlElement = DOM.htmlElement = {...DOM.htmlElement} - -@editor.completeFrom(HTMLFormElement) -type htmlFormElement = DOM.htmlFormElement = {...DOM.htmlFormElement} - -@editor.completeFrom(HTMLFormControlsCollection) -type htmlFormControlsCollection = DOM.htmlFormControlsCollection = { - ...DOM.htmlFormControlsCollection, -} - -@editor.completeFrom(HTMLSlotElement) -type htmlSlotElement = DOM.htmlSlotElement = {...DOM.htmlSlotElement} - -@editor.completeFrom(ElementInternals) -type elementInternals = DOM.elementInternals = {...DOM.elementInternals} diff --git a/src/dom-nodes/HTMLCollection.res b/src/dom-nodes/HTMLCollection.res index 99b590a8..b77d589c 100644 --- a/src/dom-nodes/HTMLCollection.res +++ b/src/dom-nodes/HTMLCollection.res @@ -2,7 +2,7 @@ A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list. [See HTMLCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection) */ -type t<'item> = DOM.htmlCollection<'item> = private {...DOM.htmlCollection<'item>} +type t<'item> = DOMTree.htmlCollection<'item> = private {...DOMTree.htmlCollection<'item>} /** Retrieves an object from various collections. diff --git a/src/dom-platform/DOMStringMap.res b/src/dom-tree/DOMStringMap.res similarity index 76% rename from src/dom-platform/DOMStringMap.res rename to src/dom-tree/DOMStringMap.res index ca4a41fc..639c8bce 100644 --- a/src/dom-platform/DOMStringMap.res +++ b/src/dom-tree/DOMStringMap.res @@ -2,4 +2,4 @@ Used by the dataset HTML attribute to represent data for custom attributes added to elements. [See DOMStringMap on MDN](https://developer.mozilla.org/docs/Web/API/DOMStringMap) */ -type t = DOM.domStringMap = private {...DOM.domStringMap} +type t = private {} diff --git a/src/dom-tree/DOMTree.res b/src/dom-tree/DOMTree.res new file mode 100644 index 00000000..af630142 --- /dev/null +++ b/src/dom-tree/DOMTree.res @@ -0,0 +1,1661 @@ +@@warning("-30") + +/** +A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list. +[See HTMLCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection) +*/ +@editor.completeFrom(HTMLCollection) +type htmlCollection<'item> = private { + /** + Sets or retrieves the number of objects in a collection. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/length) + */ + length: int, +} + +type shadowRootMode = + | @as("closed") Closed + | @as("open") Open + +type slotAssignmentMode = + | @as("manual") Manual + | @as("named") Named + +type customStateSet = {} + +/** +Node is an interface from which a number of WebApiDOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way. +[See Node on MDN](https://developer.mozilla.org/docs/Web/API/Node) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(Node) +type rec node = { + ...DOM.eventTarget, + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: DOM.nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, +} + +/** +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. +[See Element on MDN](https://developer.mozilla.org/docs/Web/API/Element) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(Element) and element = { + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: DOM.nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + Returns the namespace. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) + */ + namespaceURI: Null.t, + /** + Returns the namespace prefix. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) + */ + prefix: Null.t, + /** + Returns the local name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) + */ + localName: string, + /** + Returns the HTML-uppercased qualified name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) + */ + tagName: string, + /** + Returns the value of element's id content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) + */ + mutable id: string, + /** + Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) + */ + classList: DOM.domTokenList, + /** + Returns the value of element's slot content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) + */ + mutable slot: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) + */ + attributes: DOM.namedNodeMap, + /** + Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) + */ + shadowRoot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) + */ + part: DOM.domTokenList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) + */ + mutable scrollTop: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) + */ + mutable scrollLeft: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) + */ + scrollWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) + */ + scrollHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) + */ + clientTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) + */ + clientLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) + */ + clientWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) + */ + clientHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) + */ + currentCSSZoom: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) + */ + @throws(JsExn) + mutable outerHTML: string, + /** + Returns the child elements. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children) + */ + children: htmlCollection, + /** + Returns the first child that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild) + */ + firstElementChild: Null.t, + /** + Returns the last child that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/lastElementChild) + */ + lastElementChild: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/childElementCount) + */ + childElementCount: int, + /** + Returns the first preceding sibling that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/previousElementSibling) + */ + previousElementSibling: Null.t, + /** + Returns the first following sibling that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/nextElementSibling) + */ + nextElementSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/assignedSlot) + */ + assignedSlot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaAtomic) + */ + mutable ariaAtomic: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaAutoComplete) + */ + mutable ariaAutoComplete: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleLabel) + */ + mutable ariaBrailleLabel: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleRoleDescription) + */ + mutable ariaBrailleRoleDescription: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaBusy) + */ + mutable ariaBusy: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaChecked) + */ + mutable ariaChecked: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColCount) + */ + mutable ariaColCount: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndex) + */ + mutable ariaColIndex: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndexText) + */ + mutable ariaColIndexText: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) + */ + mutable ariaColSpan: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) + */ + mutable ariaCurrent: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaDescription) + */ + mutable ariaDescription: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaDisabled) + */ + mutable ariaDisabled: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaExpanded) + */ + mutable ariaExpanded: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaHasPopup) + */ + mutable ariaHasPopup: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaHidden) + */ + mutable ariaHidden: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaKeyShortcuts) + */ + mutable ariaKeyShortcuts: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLabel) + */ + mutable ariaLabel: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLevel) + */ + mutable ariaLevel: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaLive) + */ + mutable ariaLive: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaModal) + */ + mutable ariaModal: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiLine) + */ + mutable ariaMultiLine: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiSelectable) + */ + mutable ariaMultiSelectable: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaOrientation) + */ + mutable ariaOrientation: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPlaceholder) + */ + mutable ariaPlaceholder: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPosInSet) + */ + mutable ariaPosInSet: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaPressed) + */ + mutable ariaPressed: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaReadOnly) + */ + mutable ariaReadOnly: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRequired) + */ + mutable ariaRequired: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRoleDescription) + */ + mutable ariaRoleDescription: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowCount) + */ + mutable ariaRowCount: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndex) + */ + mutable ariaRowIndex: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndexText) + */ + mutable ariaRowIndexText: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaRowSpan) + */ + mutable ariaRowSpan: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSelected) + */ + mutable ariaSelected: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSetSize) + */ + mutable ariaSetSize: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaSort) + */ + mutable ariaSort: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMax) + */ + mutable ariaValueMax: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMin) + */ + mutable ariaValueMin: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueNow) + */ + mutable ariaValueNow: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/ariaValueText) + */ + mutable ariaValueText: Null.t, +} + +/** +A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. +[See DocumentFragment on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(DocumentFragment) and documentFragment = { + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: DOM.nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + Returns the child elements. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/children) + */ + children: htmlCollection, + /** + Returns the first child that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/firstElementChild) + */ + firstElementChild: Null.t, + /** + Returns the last child that is an element, and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/lastElementChild) + */ + lastElementChild: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/childElementCount) + */ + childElementCount: int, +} + +/** +[See ShadowRoot on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(ShadowRoot) and shadowRoot = { + // Base properties from DocumentFragment + // End base properties from DocumentFragment + + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: DOM.nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/mode) + */ + mode: shadowRootMode, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/delegatesFocus) + */ + delegatesFocus: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/slotAssignment) + */ + slotAssignment: slotAssignmentMode, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/clonable) + */ + clonable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/serializable) + */ + serializable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/host) + */ + host: element, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/styleSheets) + */ + styleSheets: CSSOMTypes.styleSheetList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/adoptedStyleSheets) + */ + @throws(JsExn) + mutable adoptedStyleSheets: array, + /** + Returns document's fullscreen element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/fullscreenElement) + */ + fullscreenElement: Null.t, + /** + Returns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document. + +For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document. + +Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/activeElement) + */ + activeElement: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/pictureInPictureElement) + */ + pictureInPictureElement: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/pointerLockElement) + */ + pointerLockElement: Null.t, +} + +/** +Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. +[See HTMLElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(HTMLElement) and htmlElement = { + // Base properties from Element + /** + Returns the namespace. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) + */ + namespaceURI: Null.t, + /** + Returns the namespace prefix. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) + */ + prefix: Null.t, + /** + Returns the local name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) + */ + localName: string, + /** + Returns the HTML-uppercased qualified name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) + */ + tagName: string, + /** + Returns the value of element's id content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) + */ + mutable id: string, + /** + Returns the value of element's class content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) + */ + mutable className: string, + /** + Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) + */ + classList: DOM.domTokenList, + /** + Returns the value of element's slot content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) + */ + mutable slot: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) + */ + attributes: DOM.namedNodeMap, + /** + Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) + */ + shadowRoot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) + */ + part: DOM.domTokenList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) + */ + mutable scrollTop: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) + */ + mutable scrollLeft: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) + */ + scrollWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) + */ + scrollHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) + */ + clientTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) + */ + clientLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) + */ + clientWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) + */ + clientHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) + */ + currentCSSZoom: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) + */ + @throws(JsExn) + mutable outerHTML: string, + // End base properties from Element + + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: DOM.nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) + */ + mutable title: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) + */ + mutable lang: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) + */ + mutable translate: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) + */ + mutable dir: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) + */ + mutable inert: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) + */ + mutable accessKey: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) + */ + accessKeyLabel: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) + */ + mutable draggable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) + */ + mutable spellcheck: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) + */ + mutable autocapitalize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) + */ + mutable innerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) + */ + mutable outerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) + */ + mutable popover: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) + */ + offsetParent: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) + */ + offsetTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) + */ + offsetLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) + */ + offsetWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) + */ + offsetHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) + */ + style: CSSOMTypes.cssStyleDeclaration, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) + */ + attributeStyleMap: CSSOMTypes.stylePropertyMap, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) + */ + mutable contentEditable: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/enterKeyHint) + */ + mutable enterKeyHint: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable) + */ + isContentEditable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inputMode) + */ + mutable inputMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) + */ + dataset: DOMStringMap.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce) + */ + mutable nonce?: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) + */ + mutable autofocus: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) + */ + mutable tabIndex: int, +} + +/** +A element in the WebApiDOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. +[See HTMLFormElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(HTMLFormElement) and htmlFormElement = { + // Base properties from HTMLElement + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) + */ + mutable title: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) + */ + mutable lang: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) + */ + mutable translate: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) + */ + mutable dir: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) + */ + mutable inert: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) + */ + mutable accessKey: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) + */ + accessKeyLabel: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) + */ + mutable draggable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) + */ + mutable spellcheck: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) + */ + mutable autocapitalize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) + */ + mutable innerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) + */ + mutable outerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) + */ + mutable popover: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) + */ + offsetParent: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) + */ + offsetTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) + */ + offsetLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) + */ + offsetWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) + */ + offsetHeight: int, + // End base properties from HTMLElement + + // Base properties from Element + /** + Returns the namespace. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) + */ + namespaceURI: Null.t, + /** + Returns the namespace prefix. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) + */ + prefix: Null.t, + /** + Returns the local name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) + */ + localName: string, + /** + Returns the HTML-uppercased qualified name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) + */ + tagName: string, + /** + Returns the value of element's id content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) + */ + mutable id: string, + /** + Returns the value of element's class content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) + */ + mutable className: string, + /** + Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) + */ + classList: DOM.domTokenList, + /** + Returns the value of element's slot content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) + */ + mutable slot: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) + */ + attributes: DOM.namedNodeMap, + /** + Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) + */ + shadowRoot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) + */ + part: DOM.domTokenList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) + */ + mutable scrollTop: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) + */ + mutable scrollLeft: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) + */ + scrollWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) + */ + scrollHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) + */ + clientTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) + */ + clientLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) + */ + clientWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) + */ + clientHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) + */ + currentCSSZoom: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) + */ + @throws(JsExn) + mutable outerHTML: string, + // End base properties from Element + + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: DOM.nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/acceptCharset) + */ + mutable acceptCharset: string, + /** + Sets or retrieves the WebApiURL to which the form content is sent for processing. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/action) + */ + mutable action: string, + /** + Specifies whether autocomplete is applied to an editable text field. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/autocomplete) + */ + mutable autocomplete: DOM.autoFillBase, + /** + Sets or retrieves the encoding type for the form. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/enctype) + */ + mutable enctype: string, + /** + Sets or retrieves the MIME encoding for the form. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/encoding) + */ + mutable encoding: string, + /** + Sets or retrieves how to send the form data to the server. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/method) + */ + mutable method: string, + /** + Sets or retrieves the name of the object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/name) + */ + mutable name: string, + /** + Sets or retrieves the window or frame at which to target content. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/target) + */ + mutable target: string, + /** + Retrieves a collection, in source order, of all controls in a given form. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/elements) + */ + elements: htmlFormControlsCollection, + /** + Sets or retrieves the number of objects in a collection. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/length) + */ + length: int, +} + +@editor.completeFrom(HTMLFormControlsCollection) +and htmlFormControlsCollection = { + length: int, +} + +@editor.completeFrom(HTMLSlotElement) +and htmlSlotElement = { + // Base properties from Element + /** + Returns the namespace. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI) + */ + namespaceURI: Null.t, + /** + Returns the namespace prefix. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/prefix) + */ + prefix: Null.t, + /** + Returns the local name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/localName) + */ + localName: string, + /** + Returns the HTML-uppercased qualified name. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/tagName) + */ + tagName: string, + /** + Returns the value of element's id content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/id) + */ + mutable id: string, + /** + Returns the value of element's class content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/className) + */ + mutable className: string, + /** + Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/classList) + */ + classList: DOM.domTokenList, + /** + Returns the value of element's slot content attribute. Can be set to change it. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/slot) + */ + mutable slot: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attributes) + */ + attributes: DOM.namedNodeMap, + /** + Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) + */ + shadowRoot: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/part) + */ + part: DOM.domTokenList, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTop) + */ + mutable scrollTop: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft) + */ + mutable scrollLeft: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth) + */ + scrollWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight) + */ + scrollHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientTop) + */ + clientTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientLeft) + */ + clientLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) + */ + clientWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/clientHeight) + */ + clientHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) + */ + currentCSSZoom: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) + */ + @throws(JsExn) + mutable innerHTML: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/outerHTML) + */ + @throws(JsExn) + mutable outerHTML: string, + // End base properties from Element + + // Base properties from Node + /** + Returns the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) + */ + nodeType: int, + /** + Returns a string appropriate for the type of node. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeName) + */ + nodeName: string, + /** + Returns node's node document's document base URL. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) + */ + baseURI: string, + /** + Returns true if node is connected and false otherwise. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isConnected) + */ + isConnected: bool, + /** + Returns the node document. Returns null for documents. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument) + */ + ownerDocument: Null.t, + /** + Returns the parent. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + */ + parentNode: Null.t, + /** + Returns the parent element. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/parentElement) + */ + parentElement: Null.t, + /** + Returns the children. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/childNodes) + */ + childNodes: DOM.nodeList, + /** + Returns the first child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + */ + firstChild: Null.t, + /** + Returns the last child. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lastChild) + */ + lastChild: Null.t, + /** + Returns the previous sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/previousSibling) + */ + previousSibling: Null.t, + /** + Returns the next sibling. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + */ + nextSibling: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeValue) + */ + mutable nodeValue: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/textContent) + */ + mutable textContent: Null.t, + // End base properties from Node + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) + */ + mutable title: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) + */ + mutable lang: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) + */ + mutable translate: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir) + */ + mutable dir: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) + */ + mutable inert: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey) + */ + mutable accessKey: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKeyLabel) + */ + accessKeyLabel: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) + */ + mutable draggable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) + */ + mutable spellcheck: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autocapitalize) + */ + mutable autocapitalize: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) + */ + mutable innerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) + */ + mutable outerText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) + */ + mutable popover: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetParent) + */ + offsetParent: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetTop) + */ + offsetTop: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetLeft) + */ + offsetLeft: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetWidth) + */ + offsetWidth: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/offsetHeight) + */ + offsetHeight: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) + */ + style: CSSOMTypes.cssStyleDeclaration, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) + */ + attributeStyleMap: CSSOMTypes.stylePropertyMap, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) + */ + mutable contentEditable: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/enterKeyHint) + */ + mutable enterKeyHint: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable) + */ + isContentEditable: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/inputMode) + */ + mutable inputMode: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) + */ + dataset: DOMStringMap.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce) + */ + mutable nonce?: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) + */ + mutable autofocus: bool, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) + */ + mutable tabIndex: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSlotElement/name) + */ + mutable name: string, +} + +@editor.completeFrom(ElementInternals) +and elementInternals = { + shadowRoot: Null.t, + form: Null.t, + willValidate: bool, + validity: DOM.validityState, + validationMessage: string, + labels: DOM.nodeList, + states: customStateSet, + mutable ariaAtomic: Null.t, + mutable ariaAutoComplete: Null.t, + mutable ariaBrailleLabel: Null.t, + mutable ariaBrailleRoleDescription: Null.t, + mutable ariaBusy: Null.t, + mutable ariaChecked: Null.t, + mutable ariaColCount: Null.t, + mutable ariaColIndex: Null.t, + mutable ariaColIndexText: Null.t, + mutable ariaColSpan: Null.t, + mutable ariaCurrent: Null.t, + mutable ariaDescription: Null.t, + mutable ariaDisabled: Null.t, + mutable ariaExpanded: Null.t, + mutable ariaHasPopup: Null.t, + mutable ariaHidden: Null.t, + mutable ariaKeyShortcuts: Null.t, + mutable ariaLabel: Null.t, + mutable ariaLevel: Null.t, + mutable ariaLive: Null.t, + mutable ariaModal: Null.t, + mutable ariaMultiLine: Null.t, + mutable ariaMultiSelectable: Null.t, + mutable ariaOrientation: Null.t, + mutable ariaPlaceholder: Null.t, + mutable ariaPosInSet: Null.t, + mutable ariaPressed: Null.t, + mutable ariaReadOnly: Null.t, + mutable ariaRequired: Null.t, + mutable ariaRoleDescription: Null.t, + mutable ariaRowCount: Null.t, + mutable ariaRowIndex: Null.t, + mutable ariaRowIndexText: Null.t, + mutable ariaRowSpan: Null.t, + mutable ariaSelected: Null.t, + mutable ariaSetSize: Null.t, + mutable ariaSort: Null.t, + mutable ariaValueMax: Null.t, + mutable ariaValueMin: Null.t, + mutable ariaValueNow: Null.t, + mutable ariaValueText: Null.t, +} From 81ac4eebeae3ff0cc9118e7b4b62323e3cee9729 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Mon, 16 Nov 2026 17:38:50 -0500 Subject: [PATCH 6/7] experiment: select intact CSS declaration modules for DOM types --- docs/content/docs/api-surface.mdx | 13 +- rescript.json | 21 +- scripts/check-features.mjs | 8 +- scripts/consumer-cssom-core.res | 2 + scripts/consumer-cssom-types.res | 2 - scripts/consumer-dom-reexports.res | 52 ++--- .../DOMStyleMapCannotBeConstructed.res | 2 +- scripts/negative-fixtures.json | 2 +- .../CSSStyleDeclaration.res} | 195 +++--------------- src/{cssom => cssom-core}/CSSStyleValue.res | 0 src/{cssom => cssom-core}/MediaList.res | 11 +- .../StylePropertyMap.res | 4 +- .../StylePropertyMapReadOnly.res | 7 +- src/cssom-core/StyleSheet.res | 153 ++++++++++++++ src/{cssom => cssom-core}/StyleSheetList.res | 7 +- src/cssom/CSSStyleDeclaration.res | 33 --- src/cssom/StyleSheet.res | 50 ----- src/dom-tree/DOMTree.res | 12 +- 18 files changed, 255 insertions(+), 319 deletions(-) create mode 100644 scripts/consumer-cssom-core.res delete mode 100644 scripts/consumer-cssom-types.res rename src/{cssom-types/CSSOMTypes.res => cssom-core/CSSStyleDeclaration.res} (91%) rename src/{cssom => cssom-core}/CSSStyleValue.res (100%) rename src/{cssom => cssom-core}/MediaList.res (66%) rename src/{cssom => cssom-core}/StylePropertyMap.res (95%) rename src/{cssom => cssom-core}/StylePropertyMapReadOnly.res (78%) create mode 100644 src/cssom-core/StyleSheet.res rename src/{cssom => cssom-core}/StyleSheetList.res (69%) delete mode 100644 src/cssom/CSSStyleDeclaration.res delete mode 100644 src/cssom/StyleSheet.res diff --git a/docs/content/docs/api-surface.mdx b/docs/content/docs/api-surface.mdx index 226a7c88..7138d576 100644 --- a/docs/content/docs/api-surface.mdx +++ b/docs/content/docs/api-surface.mdx @@ -81,7 +81,7 @@ WebAPI.URL WebAPI.Fetch WebAPI.UIEvents WebAPI.Observers WebAPI.Media WebAPI.WebAudio WebAPI.Storage WebAPI.Messaging WebAPI.Workers WebAPI.Crypto WebAPI.Performance WebAPI.ViewTransitions -WebAPI.DOMTree WebAPI.CSSOMTypes +WebAPI.DOMTree WebAPI.CSSOMCore WebAPI.History WebAPI.Location WebAPI.SafeFetch ``` @@ -129,9 +129,10 @@ types without the DOM operation modules, select: } ``` -DOMTree includes the lightweight DOM types and the shared CSSOMTypes records. -It does not enable Element, Node, HTMLCollection, or CSSStyleDeclaration operation -modules. Select DOMNodes for element/node operations, CSSOM for CSS operations, +DOMTree includes the lightweight DOM types and the shared CSSOMCore records. +It does not enable Element, Node, or HTMLCollection operation modules. The small +CSS declaration modules are kept intact, including their own operations. Select +DOMNodes for element/node operations and CSSOM for the complete CSS API, and Window for Window or Document methods. Existing operation features include their required type features automatically. An unrestricted WebAPI dependency elsewhere in the dependency graph enables all features. @@ -441,8 +442,8 @@ let redirect = WebAPI.Response.redirect(~url="/login", ~status=302) `WebAPI.DOM` stays lightweight: it supplies basic types such as window, document, and event without pulling in the rich element or CSS declaration records. `WebAPI.DOMTree` is the independently selectable rich DOM type surface, including -recursive element fields and HTML element styles. `WebAPI.CSSOMTypes` supplies -shared CSS representations without selecting CSS operations or DOMTree. +recursive element fields and HTML element styles. `WebAPI.CSSOMCore` supplies +the required CSS declaration modules without selecting Event or DOMTree. ```ReScript let parentNode = (element: WebAPI.DOMTree.element) => element.parentNode diff --git a/rescript.json b/rescript.json index 474c7ebf..edb0e687 100644 --- a/rescript.json +++ b/rescript.json @@ -10,9 +10,9 @@ "WebAPI.DOMPlatform": ["WebAPI.Event", "DOMPlatform"], "WebAPI.Animation": ["WebAPI.Event", "Animation"], "WebAPI.Geometry": ["WebAPI.DOM", "Geometry"], - "WebAPI.CSSOMTypes": ["CSSOMTypes"], - "WebAPI.CSSOM": ["WebAPI.Event", "WebAPI.CSSOMTypes", "CSSOM"], - "WebAPI.DOMTree": ["WebAPI.DOM", "WebAPI.CSSOMTypes", "DOMTree"], + "WebAPI.CSSOMCore": ["CSSOMCore"], + "WebAPI.CSSOM": ["WebAPI.Event", "WebAPI.CSSOMCore", "CSSOM"], + "WebAPI.DOMTree": ["WebAPI.DOM", "WebAPI.CSSOMCore", "DOMTree"], "WebAPI.DOMNodes": [ "WebAPI.DOMTree", "WebAPI.DOMPlatform", @@ -94,10 +94,10 @@ ] }, { - "dir": "src/cssom-types", + "dir": "src/cssom-core", "subdirs": true, - "feature": "CSSOMTypes", - "public": ["CSSOMTypes"] + "feature": "CSSOMCore", + "public": ["CSSStyleDeclaration", "CSSStyleValue", "MediaList", "StylePropertyMap", "StylePropertyMapReadOnly", "StyleSheet", "StyleSheetList"] }, { "dir": "src/dom-tree", @@ -152,14 +152,7 @@ "feature": "CSSOM", "public": [ "CSSRuleList", - "CSSStyleDeclaration", - "CSSStyleValue", - "MediaList", - "MediaQueryList", - "StylePropertyMap", - "StylePropertyMapReadOnly", - "StyleSheet", - "StyleSheetList" + "MediaQueryList" ] }, { diff --git a/scripts/check-features.mjs b/scripts/check-features.mjs index fc499098..b99ce867 100644 --- a/scripts/check-features.mjs +++ b/scripts/check-features.mjs @@ -29,7 +29,7 @@ const expectedFeatureOwners = new Map([ ["WebAPI.History", "History"], ["WebAPI.Location", "Location"], ["WebAPI.Window", "Window"], - ["WebAPI.CSSOMTypes", "CSSOMTypes"], + ["WebAPI.CSSOMCore", "CSSOMCore"], ["WebAPI.CSSOM", "CSSOM"], ["WebAPI.CSSFontLoading", "CSSFontLoading"], ["WebAPI.Geometry", "Geometry"], @@ -409,9 +409,9 @@ if (process.argv[1] !== undefined && path.resolve(process.argv[1]) === scriptPat shouldCompile: true, }, { - name: "CSS-only type consumer", - features: ["WebAPI.CSSOMTypes"], - fixture: "consumer-cssom-types.res", + name: "CSS declaration consumer", + features: ["WebAPI.CSSOMCore"], + fixture: "consumer-cssom-core.res", shouldCompile: true, }, { diff --git a/scripts/consumer-cssom-core.res b/scripts/consumer-cssom-core.res new file mode 100644 index 00000000..0470fcdb --- /dev/null +++ b/scripts/consumer-cssom-core.res @@ -0,0 +1,2 @@ +let cssText = (style: WebAPI.CSSStyleDeclaration.t) => style.cssText +let rule = (style: WebAPI.CSSStyleDeclaration.t) => style.parentRule diff --git a/scripts/consumer-cssom-types.res b/scripts/consumer-cssom-types.res deleted file mode 100644 index eac90e40..00000000 --- a/scripts/consumer-cssom-types.res +++ /dev/null @@ -1,2 +0,0 @@ -let cssText = (style: WebAPI.CSSOMTypes.cssStyleDeclaration) => style.cssText -let rule = (style: WebAPI.CSSOMTypes.cssStyleDeclaration) => style.parentRule diff --git a/scripts/consumer-dom-reexports.res b/scripts/consumer-dom-reexports.res index ab9d6b88..6921a261 100644 --- a/scripts/consumer-dom-reexports.res +++ b/scripts/consumer-dom-reexports.res @@ -1,9 +1,5 @@ let domElement: WebAPI.DOMTree.element => WebAPI.Element.t = value => value let elementDom: WebAPI.Element.t => WebAPI.DOMTree.element = value => value -let node: WebAPI.DOMTree.node => WebAPI.DOMTree.node = value => value -let nodeBack: WebAPI.DOMTree.node => WebAPI.DOMTree.node = value => value -let html: WebAPI.DOMTree.htmlElement => WebAPI.DOMTree.htmlElement = value => value -let htmlBack: WebAPI.DOMTree.htmlElement => WebAPI.DOMTree.htmlElement = value => value let collection: WebAPI.DOMTree.htmlCollection<'item> => WebAPI.HTMLCollection.t<'item> = value => value @@ -12,14 +8,6 @@ let collectionBack: WebAPI.HTMLCollection.t<'item> => WebAPI.DOMTree.htmlCollect 'item, > = value => value -let declaration: WebAPI.CSSOMTypes.cssStyleDeclaration => WebAPI.CSSStyleDeclaration.t = value => - value - -let declarationBack: WebAPI.CSSStyleDeclaration.t => WebAPI.CSSOMTypes.cssStyleDeclaration = value => - value - -let styleMap: WebAPI.CSSOMTypes.stylePropertyMap => WebAPI.StylePropertyMap.t = value => value -let styleMapBack: WebAPI.StylePropertyMap.t => WebAPI.CSSOMTypes.stylePropertyMap = value => value let mode: WebAPI.DOMTree.slotAssignmentMode = WebAPI.DOMTree.Manual let toPublic0: WebAPI.DOMTree.node => WebAPI.Node.t = value => value @@ -49,29 +37,8 @@ let toCore6: WebAPI.HTMLSlotElement.t => WebAPI.DOMTree.htmlSlotElement = value let toPublic7: WebAPI.DOMTree.elementInternals => WebAPI.ElementInternals.t = value => value let toCore7: WebAPI.ElementInternals.t => WebAPI.DOMTree.elementInternals = value => value -let toPublic8: WebAPI.CSSOMTypes.styleSheet => WebAPI.StyleSheet.t = value => value -let toCore8: WebAPI.StyleSheet.t => WebAPI.CSSOMTypes.styleSheet = value => value - -let toPublic9: WebAPI.CSSOMTypes.cssStyleSheet => WebAPI.StyleSheet.cssStyleSheet = value => value -let toCore9: WebAPI.StyleSheet.cssStyleSheet => WebAPI.CSSOMTypes.cssStyleSheet = value => value - -let toPublic10: WebAPI.CSSOMTypes.cssRule => WebAPI.StyleSheet.cssRule = value => value -let toCore10: WebAPI.StyleSheet.cssRule => WebAPI.CSSOMTypes.cssRule = value => value - -let toPublic11: WebAPI.CSSOMTypes.cssRuleList => WebAPI.CSSRuleList.t = value => value -let toCore11: WebAPI.CSSRuleList.t => WebAPI.CSSOMTypes.cssRuleList = value => value - -let toPublic12: WebAPI.CSSOMTypes.stylePropertyMapReadOnly => WebAPI.StylePropertyMapReadOnly.t = value => - value - -let toCore12: WebAPI.StylePropertyMapReadOnly.t => WebAPI.CSSOMTypes.stylePropertyMapReadOnly = value => - value - -let toPublic13: WebAPI.CSSOMTypes.styleSheetList => WebAPI.StyleSheetList.t = value => value -let toCore13: WebAPI.StyleSheetList.t => WebAPI.CSSOMTypes.styleSheetList = value => value - -let toPublic14: WebAPI.CSSOMTypes.mediaList => WebAPI.MediaList.t = value => value -let toCore14: WebAPI.MediaList.t => WebAPI.CSSOMTypes.mediaList = value => value +let toPublic11: WebAPI.StyleSheet.cssRuleList => WebAPI.CSSRuleList.t = value => value +let toCore11: WebAPI.CSSRuleList.t => WebAPI.StyleSheet.cssRuleList = value => value let treeMode = WebAPI.DOMTree.Manual let preservedTreeMode: WebAPI.DOMTree.slotAssignmentMode = treeMode @@ -79,8 +46,21 @@ let preservedTreeMode: WebAPI.DOMTree.slotAssignmentMode = treeMode let adoptedSheets = (root: WebAPI.DOMTree.shadowRoot): array => root.adoptedStyleSheets -let styleParent = (style: WebAPI.CSSStyleDeclaration.t): Null.t => +let styleParent = (style: WebAPI.CSSStyleDeclaration.t): Null.t => style.parentRule let dataset = (element: WebAPI.HTMLElement.t) => element.dataset let mutateStyle = (style: WebAPI.CSSStyleDeclaration.t, color: string) => style.color = color + +// The rich fields retain the original CSS operation-module types. +let htmlStyle = (element: WebAPI.DOMTree.htmlElement): WebAPI.CSSStyleDeclaration.t => element.style + +let slotStyle = (element: WebAPI.DOMTree.htmlSlotElement): WebAPI.CSSStyleDeclaration.t => + element.style + +let attributeStyle = (element: WebAPI.DOMTree.htmlElement): WebAPI.StylePropertyMap.t => + element.attributeStyleMap + +let sheets = (root: WebAPI.DOMTree.shadowRoot): WebAPI.StyleSheetList.t => root.styleSheets +let media = (sheet: WebAPI.StyleSheet.t): WebAPI.MediaList.t => sheet.media +let rules = (sheet: WebAPI.StyleSheet.cssStyleSheet): WebAPI.CSSRuleList.t => sheet.cssRules diff --git a/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res b/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res index ce292bcc..e57af803 100644 --- a/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res +++ b/scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res @@ -1 +1 @@ -let invalid: WebAPI.CSSOMTypes.stylePropertyMap = {size: 0} +let invalid: WebAPI.StylePropertyMap.t = {size: 0} diff --git a/scripts/negative-fixtures.json b/scripts/negative-fixtures.json index d3b327ae..47b9b2d5 100644 --- a/scripts/negative-fixtures.json +++ b/scripts/negative-fixtures.json @@ -158,7 +158,7 @@ { "name": "private DOM style map cannot be constructed", "fixture": "scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res", - "features": ["WebAPI.CSSOMTypes"], + "features": ["WebAPI.CSSOMCore"], "expectedDiagnostic": "Cannot create values of the" } ] diff --git a/src/cssom-types/CSSOMTypes.res b/src/cssom-core/CSSStyleDeclaration.res similarity index 91% rename from src/cssom-types/CSSOMTypes.res rename to src/cssom-core/CSSStyleDeclaration.res index 06ef8f77..42e7ae6f 100644 --- a/src/cssom-types/CSSOMTypes.res +++ b/src/cssom-core/CSSStyleDeclaration.res @@ -1,165 +1,5 @@ -@@warning("-30") - -/** -[See StylePropertyMapReadOnly on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) -*/ -@editor.completeFrom(StylePropertyMapReadOnly) -type stylePropertyMapReadOnly = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size) - */ - size: int, -} - -/** -[See StylePropertyMap on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap) -*/ -@editor.completeFrom(StylePropertyMap) -type stylePropertyMap = private { - ...stylePropertyMapReadOnly, -} - -@editor.completeFrom(MediaList) -type mediaList = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/mediaText) - */ - mutable mediaText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/length) - */ - length: int, -} - -/** -A list of StyleSheet. -[See StyleSheetList on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList) -*/ -@editor.completeFrom(StyleSheetList) -type styleSheetList = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/length) - */ - length: int, -} - -/** -A single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. -[See StyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet) -*/ -@editor.completeFrom(StyleSheet) -type rec styleSheet = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) - */ - @as("type") - type_: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) - */ - href: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) - */ - ownerNode: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) - */ - parentStyleSheet: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) - */ - title: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) - */ - media: mediaList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) - */ - mutable disabled: bool, -} - -/** -A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. -[See CSSStyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) -TODO: mark as private once mutating fields of private records is allowed -*/ -@editor.completeFrom(CSSStyleSheet) and cssStyleSheet = { - // Base properties from StyleSheet - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) - */ - @as("type") - type_: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) - */ - href: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) - */ - ownerNode: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) - */ - parentStyleSheet: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) - */ - title: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) - */ - media: mediaList, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) - */ - mutable disabled: bool, - // End base properties from StyleSheet - - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/ownerRule) - */ - ownerRule: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/cssRules) - */ - cssRules: cssRuleList, -} - -/** -A single CSS rule. There are several types of rules, listed in the Type constants section below. -[See CSSRule on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule) -*/ -and cssRule = { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/cssText) - */ - mutable cssText: string, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentRule) - */ - parentRule: Null.t, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentStyleSheet) - */ - parentStyleSheet: Null.t, -} - -/** -A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. -[See CSSRuleList on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList) -*/ -@editor.completeFrom(CSSRuleList) and cssRuleList = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/length) - */ - length: int, -} - @editor.completeFrom(CSSStyleDeclaration) -type cssStyleDeclaration = { +type t = { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText) */ @@ -171,7 +11,7 @@ type cssStyleDeclaration = { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule) */ - parentRule: Null.t, + parentRule: Null.t, /** [Read more on MDN](https://developer.mozilla.org/docs/Web/CSS/cx) */ @@ -1861,3 +1701,34 @@ type cssStyleDeclaration = { */ mutable cssFloat: string, } + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/item) +*/ +@send +external item: (t, int) => string = "item" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyValue) +*/ +@send +external getPropertyValue: (t, string) => string = "getPropertyValue" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyPriority) +*/ +@send +external getPropertyPriority: (t, string) => string = "getPropertyPriority" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty) +*/ +@throws(JsExn) @send +external setProperty: (t, ~property: string, ~value: string, ~priority: string=?) => unit = + "setProperty" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/removeProperty) +*/ +@throws(JsExn) @send +external removeProperty: (t, string) => string = "removeProperty" diff --git a/src/cssom/CSSStyleValue.res b/src/cssom-core/CSSStyleValue.res similarity index 100% rename from src/cssom/CSSStyleValue.res rename to src/cssom-core/CSSStyleValue.res diff --git a/src/cssom/MediaList.res b/src/cssom-core/MediaList.res similarity index 66% rename from src/cssom/MediaList.res rename to src/cssom-core/MediaList.res index 6a23790a..0472d672 100644 --- a/src/cssom/MediaList.res +++ b/src/cssom-core/MediaList.res @@ -1,5 +1,14 @@ @editor.completeFrom(MediaList) -type t = CSSOMTypes.mediaList = {...CSSOMTypes.mediaList} +type t = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/mediaText) + */ + mutable mediaText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/length) + */ + length: int, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/item) diff --git a/src/cssom/StylePropertyMap.res b/src/cssom-core/StylePropertyMap.res similarity index 95% rename from src/cssom/StylePropertyMap.res rename to src/cssom-core/StylePropertyMap.res index 29c5f833..c87f65ac 100644 --- a/src/cssom/StylePropertyMap.res +++ b/src/cssom-core/StylePropertyMap.res @@ -2,7 +2,9 @@ [See StylePropertyMap on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap) */ @editor.completeFrom(StylePropertyMap) -type t = CSSOMTypes.stylePropertyMap = private {...CSSOMTypes.stylePropertyMap} +type t = private { + ...StylePropertyMapReadOnly.t, +} external asStylePropertyMapReadOnly: t => StylePropertyMapReadOnly.t = "%identity" diff --git a/src/cssom/StylePropertyMapReadOnly.res b/src/cssom-core/StylePropertyMapReadOnly.res similarity index 78% rename from src/cssom/StylePropertyMapReadOnly.res rename to src/cssom-core/StylePropertyMapReadOnly.res index fec74e31..832efe84 100644 --- a/src/cssom/StylePropertyMapReadOnly.res +++ b/src/cssom-core/StylePropertyMapReadOnly.res @@ -2,7 +2,12 @@ [See StylePropertyMapReadOnly on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) */ @editor.completeFrom(StylePropertyMapReadOnly) -type t = CSSOMTypes.stylePropertyMapReadOnly = private {...CSSOMTypes.stylePropertyMapReadOnly} +type t = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size) + */ + size: int, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll) diff --git a/src/cssom-core/StyleSheet.res b/src/cssom-core/StyleSheet.res new file mode 100644 index 00000000..4b1b4c70 --- /dev/null +++ b/src/cssom-core/StyleSheet.res @@ -0,0 +1,153 @@ +@@warning("-30") + +/** +A single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. +[See StyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet) +*/ +type rec t = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) + */ + @as("type") + type_: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) + */ + href: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) + */ + ownerNode: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) + */ + parentStyleSheet: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) + */ + title: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) + */ + media: MediaList.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) + */ + mutable disabled: bool, +} + +/** +A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. +[See CSSStyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) +TODO: mark as private once mutating fields of private records is allowed +*/ +@editor.completeFrom(CSSStyleSheet) and cssStyleSheet = { + // Base properties from StyleSheet + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) + */ + @as("type") + type_: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) + */ + href: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) + */ + ownerNode: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) + */ + parentStyleSheet: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/title) + */ + title: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) + */ + media: MediaList.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled) + */ + mutable disabled: bool, + // End base properties from StyleSheet + + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/ownerRule) + */ + ownerRule: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/cssRules) + */ + cssRules: cssRuleList, +} + +/** +A single CSS rule. There are several types of rules, listed in the Type constants section below. +[See CSSRule on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule) +*/ +and cssRule = { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/cssText) + */ + mutable cssText: string, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentRule) + */ + parentRule: Null.t, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRule/parentStyleSheet) + */ + parentStyleSheet: Null.t, +} + +/** +A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. +[See CSSRuleList on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList) +*/ +@editor.completeFrom(CSSRuleList) and cssRuleList = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/length) + */ + length: int, +} + +type init = { + mutable baseURL?: string, + mutable media?: unknown, + mutable disabled?: bool, +} + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) +*/ +@new +external make: (~options: init=?) => cssStyleSheet = "CSSStyleSheet" + +external asStyleSheet: cssStyleSheet => t = "%identity" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/insertRule) +*/ +@throws(JsExn) @send +external insertRule: (cssStyleSheet, ~rule: string, ~index: int=?) => int = "insertRule" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/deleteRule) +*/ +@send +external deleteRule: (cssStyleSheet, int) => unit = "deleteRule" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replace) +*/ +@send +external replace: (cssStyleSheet, string) => promise = "replace" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replaceSync) +*/ +@throws(JsExn) @send +external replaceSync: (cssStyleSheet, string) => unit = "replaceSync" diff --git a/src/cssom/StyleSheetList.res b/src/cssom-core/StyleSheetList.res similarity index 69% rename from src/cssom/StyleSheetList.res rename to src/cssom-core/StyleSheetList.res index 533d09bd..ac04e957 100644 --- a/src/cssom/StyleSheetList.res +++ b/src/cssom-core/StyleSheetList.res @@ -3,7 +3,12 @@ A list of StyleSheet. [See StyleSheetList on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList) */ @editor.completeFrom(StyleSheetList) -type t = CSSOMTypes.styleSheetList = private {...CSSOMTypes.styleSheetList} +type t = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/length) + */ + length: int, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/item) diff --git a/src/cssom/CSSStyleDeclaration.res b/src/cssom/CSSStyleDeclaration.res deleted file mode 100644 index ba222b7c..00000000 --- a/src/cssom/CSSStyleDeclaration.res +++ /dev/null @@ -1,33 +0,0 @@ -@editor.completeFrom(CSSStyleDeclaration) -type t = CSSOMTypes.cssStyleDeclaration = {...CSSOMTypes.cssStyleDeclaration} - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/item) -*/ -@send -external item: (t, int) => string = "item" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyValue) -*/ -@send -external getPropertyValue: (t, string) => string = "getPropertyValue" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyPriority) -*/ -@send -external getPropertyPriority: (t, string) => string = "getPropertyPriority" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty) -*/ -@throws(JsExn) @send -external setProperty: (t, ~property: string, ~value: string, ~priority: string=?) => unit = - "setProperty" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/removeProperty) -*/ -@throws(JsExn) @send -external removeProperty: (t, string) => string = "removeProperty" diff --git a/src/cssom/StyleSheet.res b/src/cssom/StyleSheet.res deleted file mode 100644 index f7017457..00000000 --- a/src/cssom/StyleSheet.res +++ /dev/null @@ -1,50 +0,0 @@ -@@warning("-30") - -@editor.completeFrom(StyleSheet) -type t = CSSOMTypes.styleSheet = {...CSSOMTypes.styleSheet} - -@editor.completeFrom(CSSStyleSheet) -type cssStyleSheet = CSSOMTypes.cssStyleSheet = {...CSSOMTypes.cssStyleSheet} - -type cssRule = CSSOMTypes.cssRule = {...CSSOMTypes.cssRule} - -@editor.completeFrom(CSSRuleList) -type cssRuleList = CSSOMTypes.cssRuleList = private {...CSSOMTypes.cssRuleList} - -type init = { - mutable baseURL?: string, - mutable media?: unknown, - mutable disabled?: bool, -} - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) -*/ -@new -external make: (~options: init=?) => cssStyleSheet = "CSSStyleSheet" - -external asStyleSheet: cssStyleSheet => t = "%identity" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/insertRule) -*/ -@throws(JsExn) @send -external insertRule: (cssStyleSheet, ~rule: string, ~index: int=?) => int = "insertRule" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/deleteRule) -*/ -@send -external deleteRule: (cssStyleSheet, int) => unit = "deleteRule" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replace) -*/ -@send -external replace: (cssStyleSheet, string) => promise = "replace" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replaceSync) -*/ -@throws(JsExn) @send -external replaceSync: (cssStyleSheet, string) => unit = "replaceSync" diff --git a/src/dom-tree/DOMTree.res b/src/dom-tree/DOMTree.res index af630142..76fc0ca8 100644 --- a/src/dom-tree/DOMTree.res +++ b/src/dom-tree/DOMTree.res @@ -681,12 +681,12 @@ TODO: mark as private once mutating fields of private records is allowed Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/styleSheets) */ - styleSheets: CSSOMTypes.styleSheetList, + styleSheets: StyleSheetList.t, /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/adoptedStyleSheets) */ @throws(JsExn) - mutable adoptedStyleSheets: array, + mutable adoptedStyleSheets: array, /** Returns document's fullscreen element. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/fullscreenElement) @@ -965,11 +965,11 @@ TODO: mark as private once mutating fields of private records is allowed /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) */ - style: CSSOMTypes.cssStyleDeclaration, + style: CSSStyleDeclaration.t, /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) */ - attributeStyleMap: CSSOMTypes.stylePropertyMap, + attributeStyleMap: StylePropertyMap.t, /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) */ @@ -1565,11 +1565,11 @@ and htmlSlotElement = { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) */ - style: CSSOMTypes.cssStyleDeclaration, + style: CSSStyleDeclaration.t, /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) */ - attributeStyleMap: CSSOMTypes.stylePropertyMap, + attributeStyleMap: StylePropertyMap.t, /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable) */ From 87695f14e7eeb6b5a1baad70c2b2d8857258284d Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Tue, 17 Nov 2026 09:26:24 -0300 Subject: [PATCH 7/7] feat(webapi): isolate narrow touch and form data features [Codex] (#416) React bindings need clipboard data, touch lists, and FormData types without enabling the complete UIEvents and Fetch groups. Add four independently selectable features while retaining the existing broad features as compatibility umbrellas. - **WebAPI.Touch** owns Touch and TouchList and depends only on DOM. - **WebAPI.FormData** owns FormData and its unboxed entry-value union and depends only on DOM. - **WebAPI.FileEntries** moves the five existing legacy file-entry modules intact, preserving the API needed by `webkitGetAsEntry` without pulling in streams or modern filesystem handles. - **WebAPI.DataTransfer** owns the transfer/item/list modules and includes DOMTree and FileEntries, preserving `setDragImage` and `webkitGetAsEntry` at their existing public paths. Small representations now belong to the existing public API modules. UiEventsTypes and FetchTypes retain representation/constructor re-exports; file/blob signatures use their equal DOM types. Basic DOM is unchanged. This adds no backing-holder modules and keeps existing public operation names, privacy, nullability, and unboxed representations. ### Narrow dependency selection With DOMTree + History + Location, adding Touch + DataTransfer + FormData compiles **27 WebAPI source modules**, versus **102** with broad UIEvents + Fetch. Standalone Touch and FormData each compile five sources including DOM. These are compiler-inventory counts, not build-speed claims. FileList operations remain an explicit broader File opt-in; the optional separate FileList feature is not included. The change includes narrow and packed-consumer fixtures, excluded-module checks, source-inventory assertions, legacy type/constructor interoperability, and native form-data/transfer/touch coverage. It does not replace React's boxed form-value variant with WebAPI's unboxed union. ### Prerequisite Stacked on https://github.com/rescript-lang/experimental-rescript-webapi/pull/415. The new branch was created from current `origin/main` at `20d11da1` (including merged #413), then merged #415's prerequisite changes. This PR targets #415's branch to keep its review diff limited to the data-feature split; retarget to main after #415 merges. Follow-on consumers are https://github.com/jderochervlk/rescript-react/pull/1 and https://github.com/jderochervlk/rescript-react/pull/2. Existing profiling results are not measurements of this new integration. --- docs/content/docs/api-surface.mdx | 48 ++++++ package.json | 4 +- rescript.json | 44 ++++-- scripts/check-consumer.mjs | 21 +++ scripts/check-features.mjs | 31 +++- scripts/check-features.test.mjs | 17 +++ scripts/consumer-data-combined.res | 6 + scripts/consumer-data-disabled-fetch.res | 1 + scripts/consumer-data-disabled-filelist.res | 1 + scripts/consumer-data-disabled-inputevent.res | 1 + .../consumer-data-disabled-readablestream.res | 1 + scripts/consumer-data-disabled-touchevent.res | 1 + scripts/consumer-data-disabled-window.res | 1 + scripts/consumer-data-entries.res | 5 + scripts/consumer-data-form-runtime.res | 22 +++ scripts/consumer-data-form.res | 12 ++ scripts/consumer-data-touch.res | 5 + scripts/consumer-data-transfer.res | 13 ++ scripts/data-feature-consumers.mjs | 117 +++++++++++++++ .../negative/FormDataRejectsString.res | 1 + .../fixtures/negative/TouchItemNullable.res | 1 + .../fixtures/negative/TouchListPrivate.res | 1 + .../fixtures/negative/TransferItemPrivate.res | 1 + scripts/negative-fixtures.json | 24 +++ src/data-transfer/DataTransfer.res | 70 +++++++++ src/data-transfer/DataTransferItem.res | 35 +++++ .../DataTransferItemList.res | 24 +-- src/fetch/FetchTypes.res | 6 +- src/fetch/FormDataEntryValue.res | 2 - .../BaseFileAndDirectoryEntries.res | 0 .../FileAndDirectoryEntriesTypes.res | 0 .../FileSystemDirectoryEntry.res | 0 .../FileSystemDirectoryReader.res | 0 .../FileSystemEntry.res | 0 src/{fetch => form-data}/FormData.res | 7 +- src/form-data/FormDataEntryValue.res | 4 + src/touch/Touch.res | 79 ++++++++++ src/touch/TouchList.res | 13 ++ src/ui-events/DataTransfer.res | 40 ----- src/ui-events/DataTransferItem.res | 23 --- src/ui-events/Touch.res | 7 - src/ui-events/TouchList.res | 7 - src/ui-events/UiEventsTypes.res | 138 +----------------- tests/NarrowDataAliases__test.res | 28 ++++ tests/browser/NarrowData__test.res | 40 +++++ tests/fixtures.json | 9 +- 46 files changed, 664 insertions(+), 247 deletions(-) create mode 100644 scripts/consumer-data-combined.res create mode 100644 scripts/consumer-data-disabled-fetch.res create mode 100644 scripts/consumer-data-disabled-filelist.res create mode 100644 scripts/consumer-data-disabled-inputevent.res create mode 100644 scripts/consumer-data-disabled-readablestream.res create mode 100644 scripts/consumer-data-disabled-touchevent.res create mode 100644 scripts/consumer-data-disabled-window.res create mode 100644 scripts/consumer-data-entries.res create mode 100644 scripts/consumer-data-form-runtime.res create mode 100644 scripts/consumer-data-form.res create mode 100644 scripts/consumer-data-touch.res create mode 100644 scripts/consumer-data-transfer.res create mode 100644 scripts/data-feature-consumers.mjs create mode 100644 scripts/fixtures/negative/FormDataRejectsString.res create mode 100644 scripts/fixtures/negative/TouchItemNullable.res create mode 100644 scripts/fixtures/negative/TouchListPrivate.res create mode 100644 scripts/fixtures/negative/TransferItemPrivate.res create mode 100644 src/data-transfer/DataTransfer.res create mode 100644 src/data-transfer/DataTransferItem.res rename src/{ui-events => data-transfer}/DataTransferItemList.res (61%) delete mode 100644 src/fetch/FormDataEntryValue.res rename src/{file => file-entries}/BaseFileAndDirectoryEntries.res (100%) rename src/{file => file-entries}/FileAndDirectoryEntriesTypes.res (100%) rename src/{file => file-entries}/FileSystemDirectoryEntry.res (100%) rename src/{file => file-entries}/FileSystemDirectoryReader.res (100%) rename src/{file => file-entries}/FileSystemEntry.res (100%) rename src/{fetch => form-data}/FormData.res (86%) create mode 100644 src/form-data/FormDataEntryValue.res create mode 100644 src/touch/Touch.res create mode 100644 src/touch/TouchList.res delete mode 100644 src/ui-events/DataTransfer.res delete mode 100644 src/ui-events/DataTransferItem.res delete mode 100644 src/ui-events/Touch.res delete mode 100644 src/ui-events/TouchList.res create mode 100644 tests/NarrowDataAliases__test.res create mode 100644 tests/browser/NarrowData__test.res diff --git a/docs/content/docs/api-surface.mdx b/docs/content/docs/api-surface.mdx index 1dfcbebc..c3c7fed8 100644 --- a/docs/content/docs/api-surface.mdx +++ b/docs/content/docs/api-surface.mdx @@ -82,6 +82,8 @@ WebAPI.Observers WebAPI.Media WebAPI.WebAudio WebAPI.Storage WebAPI.Messaging WebAPI.Workers WebAPI.Crypto WebAPI.Performance WebAPI.ViewTransitions WebAPI.DOMTree WebAPI.CSSOMCore +WebAPI.Touch WebAPI.DataTransfer WebAPI.FileEntries +WebAPI.FormData WebAPI.History WebAPI.Location WebAPI.SafeFetch ``` @@ -137,6 +139,52 @@ and Window for Window or Document methods. Existing operation features include their required type features automatically. An unrestricted WebAPI dependency elsewhere in the dependency graph enables all features. +## Narrow touch, clipboard and form-data features + +Select `WebAPI.Touch` for Touch/TouchList and `WebAPI.FormData` for FormData and +its unboxed string/file entry values. Each depends only on basic DOM and compiles +five source modules including that dependency. + +`WebAPI.DataTransfer` includes its item/list APIs, DOMTree for `setDragImage`, +and `WebAPI.FileEntries` for the existing `webkitGetAsEntry` operation. +FileEntries is the five-module legacy entry family, not the modern filesystem +handle or stream APIs. UIEvents, Fetch, and File continue to include all their +previous modules through these smaller features. + +For React bindings selecting DOMTree, History, and Location, adding Touch, +DataTransfer, and FormData selects **27 WebAPI source modules**, rather than +102 with broad UIEvents and Fetch. These are source counts, not speed claims. +Basic DOM is unchanged. FileList operations still require WebAPI.File; a +DataTransfer's `files` field exposes the core file-list type and its length. + +```json +{ + "dependencies": [ + { + "name": "@rescript/webapi", + "features": [ + "WebAPI.DOMTree", + "WebAPI.History", + "WebAPI.Location", + "WebAPI.Touch", + "WebAPI.DataTransfer", + "WebAPI.FormData" + ] + } + ] +} +``` + +Use `Touch.init` for constructor options and `Touch.Direct` / `Touch.Stylus` +for its touch-type variant. Existing broad event and fetch APIs accept these +same types without casts. FormDataEntryValue remains an **unboxed** union; +it is not interchangeable with a separately defined boxed React variant. + +The declared private empty FormData representation is unchanged. ReScript +13.0.0-alpha.7 still accepts an empty-record literal for this type, as it did +before this split; use the FormData constructor rather than constructing records. +The split does not claim to fix that existing compiler limitation. + ## Fetch Use `WebAPI.Fetch.fetch` for string URLs and `WebAPI.Fetch.fetchWithRequest` diff --git a/package.json b/package.json index 5e19d801..fed4b691 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,8 @@ "check:consumer": "node scripts/check-consumer.mjs", "check:release": "node --test scripts/validate-release-artifact.test.mjs scripts/check-release.test.mjs && node scripts/check-release.mjs", "check:docs-links": "node --test scripts/check-doc-links.test.mjs scripts/check-doc-type-links.test.mjs && node scripts/check-doc-links.mjs", - "format": "rescript format && oxfmt ./tests/index.js ./tests/fixtures.json ./tests/browser/*.mjs ./scripts/negative-fixtures.json ./scripts/validate-release-artifact.mjs ./scripts/validate-release-artifact.test.mjs ./playwright.config.mjs ./astro.config.mjs ./scripts/check-consumer.mjs ./scripts/check-release.mjs ./scripts/check-release.test.mjs ./scripts/check-features.mjs ./scripts/check-features.test.mjs ./scripts/check-doc-links.mjs ./scripts/check-doc-links.test.mjs ./scripts/check-doc-type-links.test.mjs ./package.json ./README.md ./CHANGELOG.md ./docs && prettier --write .github/workflows/*.yml ./docs/pages", - "format:check": "rescript format --check && oxfmt ./tests/index.js ./tests/fixtures.json ./tests/browser/*.mjs ./scripts/negative-fixtures.json ./scripts/validate-release-artifact.mjs ./scripts/validate-release-artifact.test.mjs ./playwright.config.mjs ./astro.config.mjs ./scripts/check-consumer.mjs ./scripts/check-release.mjs ./scripts/check-release.test.mjs ./scripts/check-features.mjs ./scripts/check-features.test.mjs ./scripts/check-doc-links.mjs ./scripts/check-doc-links.test.mjs ./scripts/check-doc-type-links.test.mjs ./package.json ./README.md ./CHANGELOG.md ./docs --check && prettier --check .github/workflows/*.yml ./docs/pages", + "format": "rescript format && oxfmt ./tests/index.js ./tests/fixtures.json ./tests/browser/*.mjs ./scripts/negative-fixtures.json ./scripts/validate-release-artifact.mjs ./scripts/validate-release-artifact.test.mjs ./playwright.config.mjs ./astro.config.mjs ./scripts/check-consumer.mjs ./scripts/check-release.mjs ./scripts/check-release.test.mjs ./scripts/check-features.mjs ./scripts/check-features.test.mjs ./scripts/data-feature-consumers.mjs ./scripts/check-doc-links.mjs ./scripts/check-doc-links.test.mjs ./scripts/check-doc-type-links.test.mjs ./package.json ./README.md ./CHANGELOG.md ./docs && prettier --write .github/workflows/*.yml ./docs/pages", + "format:check": "rescript format --check && oxfmt ./tests/index.js ./tests/fixtures.json ./tests/browser/*.mjs ./scripts/negative-fixtures.json ./scripts/validate-release-artifact.mjs ./scripts/validate-release-artifact.test.mjs ./playwright.config.mjs ./astro.config.mjs ./scripts/check-consumer.mjs ./scripts/check-release.mjs ./scripts/check-release.test.mjs ./scripts/check-features.mjs ./scripts/check-features.test.mjs ./scripts/data-feature-consumers.mjs ./scripts/check-doc-links.mjs ./scripts/check-doc-links.test.mjs ./scripts/check-doc-type-links.test.mjs ./package.json ./README.md ./CHANGELOG.md ./docs --check && prettier --check .github/workflows/*.yml ./docs/pages", "docs": "astro dev", "prebuild:docs": "node docs/llm.js", "build:docs": "astro build" diff --git a/rescript.json b/rescript.json index edb0e687..a1042a90 100644 --- a/rescript.json +++ b/rescript.json @@ -44,7 +44,9 @@ "WebAPI.Geometry", "Observers" ], - "WebAPI.UIEvents": ["WebAPI.DOMNodes", "WebAPI.File", "UIEvents"], + "WebAPI.Touch": ["WebAPI.DOM", "Touch"], + "WebAPI.DataTransfer": ["WebAPI.DOMTree", "WebAPI.FileEntries", "DataTransfer"], + "WebAPI.UIEvents": ["WebAPI.DOMNodes", "WebAPI.File", "WebAPI.Touch", "WebAPI.DataTransfer", "UIEvents"], "WebAPI.Canvas": [ "WebAPI.Geometry", "WebAPI.HTML", @@ -62,9 +64,11 @@ "WebAPI.Workers", "Navigator" ], - "WebAPI.File": ["WebAPI.Event", "File"], + "WebAPI.FileEntries": ["WebAPI.DOM", "FileEntries"], + "WebAPI.File": ["WebAPI.Event", "WebAPI.FileEntries", "File"], "WebAPI.URL": ["WebAPI.DOM", "URL"], - "WebAPI.Fetch": ["WebAPI.Event", "WebAPI.File", "WebAPI.URL", "Fetch"], + "WebAPI.FormData": ["WebAPI.DOM", "FormData"], + "WebAPI.Fetch": ["WebAPI.Event", "WebAPI.File", "WebAPI.URL", "WebAPI.FormData", "Fetch"], "WebAPI.SafeFetch": ["WebAPI.Fetch", "SafeFetch"], "WebAPI.CSSFontLoading": ["WebAPI.Event", "CSSFontLoading"], "WebAPI.Device": ["WebAPI.Event", "Device"], @@ -350,8 +354,6 @@ "public": [ "BodyInit", "Fetch", - "FormData", - "FormDataEntryValue", "Headers", "HeadersInit", "Request", @@ -372,10 +374,7 @@ "Blob", "File", "FileList", - "FileSystemDirectoryEntry", "FileSystemDirectoryHandle", - "FileSystemDirectoryReader", - "FileSystemEntry", "FileSystemFileHandle", "FileSystemHandle", "FileSystemWritableFileStream", @@ -488,23 +487,42 @@ "WorkerLocation" ] }, + { + "dir": "src/touch", + "subdirs": true, + "feature": "Touch", + "public": ["Touch", "TouchList"] + }, + { + "dir": "src/form-data", + "subdirs": true, + "feature": "FormData", + "public": ["FormData", "FormDataEntryValue"] + }, + { + "dir": "src/file-entries", + "subdirs": true, + "feature": "FileEntries", + "public": ["FileSystemEntry", "FileSystemDirectoryEntry", "FileSystemDirectoryReader"] + }, + { + "dir": "src/data-transfer", + "subdirs": true, + "feature": "DataTransfer", + "public": ["DataTransfer", "DataTransferItem", "DataTransferItemList"] + }, { "dir": "src/ui-events", "subdirs": true, "feature": "UIEvents", "public": [ "CompositionEvent", - "DataTransfer", - "DataTransferItem", - "DataTransferItemList", "FocusEvent", "InputEvent", "KeyboardEvent", "MouseEvent", "PointerEvent", - "Touch", "TouchEvent", - "TouchList", "UIEvent", "WheelEvent" ] diff --git a/scripts/check-consumer.mjs b/scripts/check-consumer.mjs index af4af15a..9c3246e06 100644 --- a/scripts/check-consumer.mjs +++ b/scripts/check-consumer.mjs @@ -4,6 +4,7 @@ import os from "node:os"; import path from "node:path"; import { fileURLToPath, pathToFileURL } from "node:url"; import { validateReleaseArtifact } from "./validate-release-artifact.mjs"; +import { dataFeatureConsumers } from "./data-feature-consumers.mjs"; const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); const packageJson = JSON.parse(readFileSync(path.join(repoRoot, "package.json"), "utf8")); @@ -193,6 +194,14 @@ const checkConsumers = async () => { if (!negativeOnly) { const scenarios = [ + ...dataFeatureConsumers.map((consumer) => ({ + ...consumer, + fixture: `scripts/${consumer.fixture}`, + expectedFailure: + consumer.missingModule === undefined + ? null + : `The module or file WebAPI.${consumer.missingModule} can\'t be found.`, + })), { name: "default", fixture: "scripts/consumer-default.res", features: null }, { name: "concrete public types", @@ -240,6 +249,18 @@ const checkConsumers = async () => { projectDirectory, ); console.log(`[ok] packed consumer runtime using ReScript ${compilerVersion}`); + writeProject(projectDirectory, "scripts/consumer-data-form-runtime.res", ["WebAPI.FormData"]); + compile(projectDirectory); + runCommand( + process.execPath, + [ + "--input-type=module", + "--eval", + `await import(${JSON.stringify(pathToFileURL(path.join(projectDirectory, "src/Consumer.js")).href)} + "?formdata")`, + ], + projectDirectory, + ); + console.log("[ok] packed narrow FormData runtime"); } const negativeCases = JSON.parse( diff --git a/scripts/check-features.mjs b/scripts/check-features.mjs index b99ce867..45590c8d 100644 --- a/scripts/check-features.mjs +++ b/scripts/check-features.mjs @@ -4,6 +4,7 @@ import { mkdtempSync, mkdirSync, readFileSync, + readdirSync, rmSync, statSync, symlinkSync, @@ -14,6 +15,8 @@ import path from "node:path"; import { spawnSync } from "node:child_process"; import { fileURLToPath } from "node:url"; +import { dataFeatureConsumers } from "./data-feature-consumers.mjs"; + const scriptPath = fileURLToPath(import.meta.url); const repoRoot = path.resolve(path.dirname(scriptPath), ".."); const configPath = path.join(repoRoot, "rescript.json"); @@ -42,6 +45,10 @@ const expectedFeatureOwners = new Map([ ["WebAPI.Fetch", "Fetch"], ["WebAPI.SafeFetch", "SafeFetch"], ["WebAPI.UIEvents", "UIEvents"], + ["WebAPI.Touch", "Touch"], + ["WebAPI.FormData", "FormData"], + ["WebAPI.DataTransfer", "DataTransfer"], + ["WebAPI.FileEntries", "FileEntries"], ["WebAPI.Observers", "Observers"], ["WebAPI.Media", "Media"], ["WebAPI.WebAudio", "WebAudio"], @@ -304,7 +311,14 @@ export const isMissingModuleDiagnostic = (output, moduleName) => export const isMissingSafeFetchDiagnostic = (output) => isMissingModuleDiagnostic(output, "SafeFetch"); -const runConsumerCheck = ({ name, features, fixture, shouldCompile, missingModule }) => { +const runConsumerCheck = ({ + name, + features, + fixture, + shouldCompile, + missingModule, + expectedSources, +}) => { const directory = mkdtempSync(path.join(os.tmpdir(), "webapi-feature-consumer-")); try { prepareConsumer(directory, features, fixture); @@ -313,6 +327,17 @@ const runConsumerCheck = ({ name, features, fixture, shouldCompile, missingModul encoding: "utf8", }); const output = `${result.stdout ?? ""}\n${result.stderr ?? ""}`; + if (result.status === 0 && expectedSources !== undefined) { + const sourceArtifacts = path.join(directory, "node_modules/@rescript/webapi/lib/bs/src"); + const count = readdirSync(sourceArtifacts, { recursive: true }).filter((file) => + file.endsWith(".cmj"), + ).length; + if (count !== expectedSources) + return { + _tag: "Failure", + message: `${name}: expected ${expectedSources} sources, got ${count}`, + }; + } const passed = shouldCompile ? result.status === 0 : result.status !== null && @@ -371,6 +396,10 @@ if (process.argv[1] !== undefined && path.resolve(process.argv[1]) === scriptPat } for (const consumer of [ + ...dataFeatureConsumers.map((consumer) => ({ + ...consumer, + shouldCompile: consumer.missingModule === undefined, + })), { name: "SafeFetch consumer", features: ["WebAPI.SafeFetch"], diff --git a/scripts/check-features.test.mjs b/scripts/check-features.test.mjs index 70353ed6..14086852 100644 --- a/scripts/check-features.test.mjs +++ b/scripts/check-features.test.mjs @@ -64,3 +64,20 @@ test("does not accept an unrelated compiler failure mentioning SafeFetch", () => ); assert.equal(isMissingSafeFetchDiagnostic("SafeFetch consumer has a type error."), false); }); + +test("narrow data features preserve broad feature umbrellas", () => { + assert.deepEqual(validateConfig(config), []); + assert.deepEqual(config.features["WebAPI.Touch"], ["WebAPI.DOM", "Touch"]); + assert.deepEqual(config.features["WebAPI.FormData"], ["WebAPI.DOM", "FormData"]); + assert.deepEqual(config.features["WebAPI.FileEntries"], ["WebAPI.DOM", "FileEntries"]); + assert.deepEqual(config.features["WebAPI.DataTransfer"], [ + "WebAPI.DOMTree", + "WebAPI.FileEntries", + "DataTransfer", + ]); + assert.ok(config.features["WebAPI.UIEvents"].includes("WebAPI.Touch")); + assert.ok(config.features["WebAPI.UIEvents"].includes("WebAPI.DataTransfer")); + assert.ok(config.features["WebAPI.UIEvents"].includes("WebAPI.File")); + assert.ok(config.features["WebAPI.File"].includes("WebAPI.FileEntries")); + assert.ok(config.features["WebAPI.Fetch"].includes("WebAPI.FormData")); +}); diff --git a/scripts/consumer-data-combined.res b/scripts/consumer-data-combined.res new file mode 100644 index 00000000..a88f7f47 --- /dev/null +++ b/scripts/consumer-data-combined.res @@ -0,0 +1,6 @@ +let data = (): WebAPI.DataTransfer.t => WebAPI.DataTransfer.make() +let touch = (list: WebAPI.TouchList.t) => list->WebAPI.TouchList.item(0) +let form = (): WebAPI.FormData.t => WebAPI.FormData.make() +let location = (location: WebAPI.Location.t) => location.pathname +let history = (history: WebAPI.History.t) => history.state +let element = (element: WebAPI.DOMTree.element) => element diff --git a/scripts/consumer-data-disabled-fetch.res b/scripts/consumer-data-disabled-fetch.res new file mode 100644 index 00000000..9413ddaa --- /dev/null +++ b/scripts/consumer-data-disabled-fetch.res @@ -0,0 +1 @@ +let fetch = WebAPI.Fetch.fetch diff --git a/scripts/consumer-data-disabled-filelist.res b/scripts/consumer-data-disabled-filelist.res new file mode 100644 index 00000000..3fbcf5d9 --- /dev/null +++ b/scripts/consumer-data-disabled-filelist.res @@ -0,0 +1 @@ +let item = WebAPI.FileList.item diff --git a/scripts/consumer-data-disabled-inputevent.res b/scripts/consumer-data-disabled-inputevent.res new file mode 100644 index 00000000..f8f57665 --- /dev/null +++ b/scripts/consumer-data-disabled-inputevent.res @@ -0,0 +1 @@ +let make = WebAPI.InputEvent.make diff --git a/scripts/consumer-data-disabled-readablestream.res b/scripts/consumer-data-disabled-readablestream.res new file mode 100644 index 00000000..33d6afa1 --- /dev/null +++ b/scripts/consumer-data-disabled-readablestream.res @@ -0,0 +1 @@ +let make = WebAPI.ReadableStream.make diff --git a/scripts/consumer-data-disabled-touchevent.res b/scripts/consumer-data-disabled-touchevent.res new file mode 100644 index 00000000..4587677f --- /dev/null +++ b/scripts/consumer-data-disabled-touchevent.res @@ -0,0 +1 @@ +let make = WebAPI.TouchEvent.make diff --git a/scripts/consumer-data-disabled-window.res b/scripts/consumer-data-disabled-window.res new file mode 100644 index 00000000..5c02199f --- /dev/null +++ b/scripts/consumer-data-disabled-window.res @@ -0,0 +1 @@ +let location = WebAPI.Window.location diff --git a/scripts/consumer-data-entries.res b/scripts/consumer-data-entries.res new file mode 100644 index 00000000..58caafe3 --- /dev/null +++ b/scripts/consumer-data-entries.res @@ -0,0 +1,5 @@ +let getParent = (entry: WebAPI.FileSystemEntry.t) => + entry->WebAPI.FileSystemEntry.getParent(~successCallback=parent => ignore(parent.name)) +let read = (directory: WebAPI.FileSystemDirectoryEntry.t) => + directory->WebAPI.FileSystemDirectoryEntry.createReader + ->WebAPI.FileSystemDirectoryReader.readEntries(~successCallback=ignore) diff --git a/scripts/consumer-data-form-runtime.res b/scripts/consumer-data-form-runtime.res new file mode 100644 index 00000000..44ab9bce --- /dev/null +++ b/scripts/consumer-data-form-runtime.res @@ -0,0 +1,22 @@ +open WebAPI +@new external blob: array => DOM.blob = "Blob" +let form = FormData.make() +form->FormData.append(~name="text", ~value="hello") +form->FormData.appendBlob(~name="file", ~blobValue=blob(["contents"]), ~filename="sample.txt") +assert(form->FormData.get("missing")->Null.toOption == None) + +assert(switch form->FormData.get("text")->Null.toOption { +| Some(String("hello")) => true +| _ => false +}) + +assert(switch form->FormData.get("file")->Null.toOption { +| Some(File(file)) => file.name == "sample.txt" && file.size == 8 +| _ => false +}) + +let values = form->FormData.getAll("text") +assert(values->Array.length == 1) +let entry: FormDataEntryValue.t = String("unboxed") +let isUnboxed = (_value: FormDataEntryValue.t): bool => %raw(`_value === "unboxed"`) +assert(isUnboxed(entry)) diff --git a/scripts/consumer-data-form.res b/scripts/consumer-data-form.res new file mode 100644 index 00000000..f4f6e95b --- /dev/null +++ b/scripts/consumer-data-form.res @@ -0,0 +1,12 @@ +let make = (): WebAPI.FormData.t => WebAPI.FormData.make() +let appendBlob = (form: WebAPI.FormData.t, blob: WebAPI.DOM.blob) => + form->WebAPI.FormData.appendBlob(~name="file", ~blobValue=blob, ~filename="file.txt") +let entry = (value: WebAPI.FormDataEntryValue.t) => + switch value { + | String(text) => text + | File(file) => file.name + } +let get = (form: WebAPI.FormData.t): Null.t => + form->WebAPI.FormData.get("name") +let entries = (form: WebAPI.FormData.t): iterable<(string, WebAPI.FormDataEntryValue.t)> => + form->WebAPI.FormData.entries diff --git a/scripts/consumer-data-touch.res b/scripts/consumer-data-touch.res new file mode 100644 index 00000000..4872dc70 --- /dev/null +++ b/scripts/consumer-data-touch.res @@ -0,0 +1,5 @@ +let make = (target: WebAPI.DOM.eventTarget): WebAPI.Touch.t => + WebAPI.Touch.make({identifier: 1, target, touchType: WebAPI.Touch.Direct}) +let item = (list: WebAPI.TouchList.t): Null.t => + list->WebAPI.TouchList.item(0) +let target = (touch: WebAPI.Touch.t): WebAPI.DOM.eventTarget => touch.target diff --git a/scripts/consumer-data-transfer.res b/scripts/consumer-data-transfer.res new file mode 100644 index 00000000..e41c9ff3 --- /dev/null +++ b/scripts/consumer-data-transfer.res @@ -0,0 +1,13 @@ +let make = (): WebAPI.DataTransfer.t => WebAPI.DataTransfer.make() +let addFile = (data: WebAPI.DataTransfer.t, file: WebAPI.DOM.file) => + data.items->WebAPI.DataTransferItemList.addFile(file) +let getFile = (item: WebAPI.DataTransferItem.t): Null.t => + item->WebAPI.DataTransferItem.getAsFile +let legacyEntry = (item: WebAPI.DataTransferItem.t): Null.t => + item->WebAPI.DataTransferItem.webkitGetAsEntry +let dragImage = (data: WebAPI.DataTransfer.t, element: WebAPI.DOMTree.element) => + data->WebAPI.DataTransfer.setDragImage(~image=element, ~x=0, ~y=0) +let mutate = (data: WebAPI.DataTransfer.t) => { + data.dropEffect = "copy" + data.effectAllowed = "copyMove" +} diff --git a/scripts/data-feature-consumers.mjs b/scripts/data-feature-consumers.mjs new file mode 100644 index 00000000..38a177bf --- /dev/null +++ b/scripts/data-feature-consumers.mjs @@ -0,0 +1,117 @@ +export const dataFeatureConsumers = [ + { + name: "Touch", + features: ["WebAPI.Touch"], + fixture: "consumer-data-touch.res", + expectedSources: 5, + }, + { + name: "FormData", + features: ["WebAPI.FormData"], + fixture: "consumer-data-form.res", + expectedSources: 5, + }, + { + name: "FileEntries", + features: ["WebAPI.FileEntries"], + fixture: "consumer-data-entries.res", + expectedSources: 8, + }, + { + name: "DataTransfer", + features: ["WebAPI.DataTransfer"], + fixture: "consumer-data-transfer.res", + expectedSources: 20, + }, + { + name: "combined React data selection", + features: [ + "WebAPI.DOMTree", + "WebAPI.History", + "WebAPI.Location", + "WebAPI.Touch", + "WebAPI.DataTransfer", + "WebAPI.FormData", + ], + fixture: "consumer-data-combined.res", + expectedSources: 27, + }, + { + name: "narrow excludes Fetch", + features: [ + "WebAPI.DOMTree", + "WebAPI.History", + "WebAPI.Location", + "WebAPI.Touch", + "WebAPI.DataTransfer", + "WebAPI.FormData", + ], + fixture: "consumer-data-disabled-fetch.res", + missingModule: "Fetch", + }, + { + name: "narrow excludes TouchEvent", + features: [ + "WebAPI.DOMTree", + "WebAPI.History", + "WebAPI.Location", + "WebAPI.Touch", + "WebAPI.DataTransfer", + "WebAPI.FormData", + ], + fixture: "consumer-data-disabled-touchevent.res", + missingModule: "TouchEvent", + }, + { + name: "narrow excludes InputEvent", + features: [ + "WebAPI.DOMTree", + "WebAPI.History", + "WebAPI.Location", + "WebAPI.Touch", + "WebAPI.DataTransfer", + "WebAPI.FormData", + ], + fixture: "consumer-data-disabled-inputevent.res", + missingModule: "InputEvent", + }, + { + name: "narrow excludes ReadableStream", + features: [ + "WebAPI.DOMTree", + "WebAPI.History", + "WebAPI.Location", + "WebAPI.Touch", + "WebAPI.DataTransfer", + "WebAPI.FormData", + ], + fixture: "consumer-data-disabled-readablestream.res", + missingModule: "ReadableStream", + }, + { + name: "narrow excludes Window", + features: [ + "WebAPI.DOMTree", + "WebAPI.History", + "WebAPI.Location", + "WebAPI.Touch", + "WebAPI.DataTransfer", + "WebAPI.FormData", + ], + fixture: "consumer-data-disabled-window.res", + missingModule: "Window", + }, + { + name: "narrow excludes FileList", + features: [ + "WebAPI.DOMTree", + "WebAPI.History", + "WebAPI.Location", + "WebAPI.Touch", + "WebAPI.DataTransfer", + "WebAPI.FormData", + ], + fixture: "consumer-data-disabled-filelist.res", + missingModule: "FileList", + }, +]; diff --git a/scripts/fixtures/negative/FormDataRejectsString.res b/scripts/fixtures/negative/FormDataRejectsString.res new file mode 100644 index 00000000..a447b359 --- /dev/null +++ b/scripts/fixtures/negative/FormDataRejectsString.res @@ -0,0 +1 @@ +let fake: WebAPI.FormData.t = "not form data" diff --git a/scripts/fixtures/negative/TouchItemNullable.res b/scripts/fixtures/negative/TouchItemNullable.res new file mode 100644 index 00000000..b09bdf49 --- /dev/null +++ b/scripts/fixtures/negative/TouchItemNullable.res @@ -0,0 +1 @@ +let item = (list: WebAPI.TouchList.t): WebAPI.Touch.t => list->WebAPI.TouchList.item(0) diff --git a/scripts/fixtures/negative/TouchListPrivate.res b/scripts/fixtures/negative/TouchListPrivate.res new file mode 100644 index 00000000..ee3f7e29 --- /dev/null +++ b/scripts/fixtures/negative/TouchListPrivate.res @@ -0,0 +1 @@ +let fake: WebAPI.TouchList.t = {length: 0} diff --git a/scripts/fixtures/negative/TransferItemPrivate.res b/scripts/fixtures/negative/TransferItemPrivate.res new file mode 100644 index 00000000..6267f700 --- /dev/null +++ b/scripts/fixtures/negative/TransferItemPrivate.res @@ -0,0 +1 @@ +let fake: WebAPI.DataTransferItem.t = {kind: "file", type_: "text/plain"} diff --git a/scripts/negative-fixtures.json b/scripts/negative-fixtures.json index d5d3ecf5..9d0f418f 100644 --- a/scripts/negative-fixtures.json +++ b/scripts/negative-fixtures.json @@ -166,5 +166,29 @@ "fixture": "scripts/fixtures/negative/DOMStyleMapCannotBeConstructed.res", "features": ["WebAPI.CSSOMCore"], "expectedDiagnostic": "Cannot create values of the" + }, + { + "name": "TouchListPrivate", + "fixture": "scripts/fixtures/negative/TouchListPrivate.res", + "features": ["WebAPI.Touch"], + "expectedDiagnostic": "Cannot create values of the" + }, + { + "name": "TransferItemPrivate", + "fixture": "scripts/fixtures/negative/TransferItemPrivate.res", + "features": ["WebAPI.DataTransfer"], + "expectedDiagnostic": "Cannot create values of the" + }, + { + "name": "FormDataRejectsString", + "fixture": "scripts/fixtures/negative/FormDataRejectsString.res", + "features": ["WebAPI.FormData"], + "expectedDiagnostic": "This has type:" + }, + { + "name": "TouchItemNullable", + "fixture": "scripts/fixtures/negative/TouchItemNullable.res", + "features": ["WebAPI.Touch"], + "expectedDiagnostic": "This has type:" } ] diff --git a/src/data-transfer/DataTransfer.res b/src/data-transfer/DataTransfer.res new file mode 100644 index 00000000..b977141b --- /dev/null +++ b/src/data-transfer/DataTransfer.res @@ -0,0 +1,70 @@ +@editor.completeFrom(DataTransfer) +type t = { + /** + Returns the kind of operation that is currently selected. If the kind of operation isn't one of those that is allowed by the effectAllowed attribute, then the operation will fail. + +Can be set, to change the selected operation. + +The possible values are "none", "copy", "link", and "move". + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/dropEffect) + */ + mutable dropEffect: string, + /** + Returns the kinds of operations that are to be allowed. + +Can be set (during the dragstart event), to change the allowed operations. + +The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized", + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/effectAllowed) + */ + mutable effectAllowed: string, + /** + Returns a DataTransferItemList object, with the drag data. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/items) + */ + items: DataTransferItemList.t, + /** + Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files". + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/types) + */ + types: array, + /** + Returns a FileList of the files being dragged, if any. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/files) + */ + files: DOM.fileList, +} + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer) +*/ +@new +external make: unit => t = "DataTransfer" + +/** +Uses the given element to update the drag feedback, replacing any previously specified feedback. +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/setDragImage) +*/ +@send +external setDragImage: (t, ~image: DOMTree.element, ~x: int, ~y: int) => unit = "setDragImage" + +/** +Returns the specified data. If there is no such data, returns the empty string. +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/getData) +*/ +@send +external getData: (t, string) => string = "getData" + +/** +Adds the specified data. +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/setData) +*/ +@send +external setData: (t, ~format: string, ~data: string) => unit = "setData" + +/** +Removes the data of the specified formats. Removes all data if the argument is omitted. +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/clearData) +*/ +@send +external clearData: (t, ~format: string=?) => unit = "clearData" diff --git a/src/data-transfer/DataTransferItem.res b/src/data-transfer/DataTransferItem.res new file mode 100644 index 00000000..c6f67f3d --- /dev/null +++ b/src/data-transfer/DataTransferItem.res @@ -0,0 +1,35 @@ +@editor.completeFrom(DataTransferItem) +type t = private { + /** + Returns the drag data item kind, one of: "string", "file". + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/kind) + */ + kind: string, + /** + Returns the drag data item type string. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/type) + */ + @as("type") + type_: string, +} + +/** +Invokes the callback with the string data as the argument, if the drag data item kind is text. +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/getAsString) +*/ +@send +external getAsString: (t, string => unit) => unit = "getAsString" + +/** +Returns a WebApiFile object, if the drag data item kind is File. +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/getAsFile) +*/ +@send +external getAsFile: t => Null.t = "getAsFile" + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/webkitGetAsEntry) +*/ +@send +external webkitGetAsEntry: t => Null.t = + "webkitGetAsEntry" diff --git a/src/ui-events/DataTransferItemList.res b/src/data-transfer/DataTransferItemList.res similarity index 61% rename from src/ui-events/DataTransferItemList.res rename to src/data-transfer/DataTransferItemList.res index 30c9eb50..362ccb55 100644 --- a/src/ui-events/DataTransferItemList.res +++ b/src/data-transfer/DataTransferItemList.res @@ -1,36 +1,36 @@ -type t = UiEventsTypes.dataTransferItemList = private {...UiEventsTypes.dataTransferItemList} +@editor.completeFrom(DataTransferItemList) +type t = private { + /** + Returns the number of items in the drag data store. + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/length) + */ + length: int, +} /** Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/add) */ @throws(JsExn) @send -external add: ( - UiEventsTypes.dataTransferItemList, - ~data: string, - ~type_: string, -) => Null.t = "add" +external add: (t, ~data: string, ~type_: string) => Null.t = "add" /** Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/add) */ @throws(JsExn) @send -external addFile: ( - UiEventsTypes.dataTransferItemList, - FileTypes.file, -) => Null.t = "add" +external addFile: (t, DOM.file) => Null.t = "add" /** Removes the indexth entry in the drag data store. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/remove) */ @throws(JsExn) @send -external remove: (UiEventsTypes.dataTransferItemList, int) => unit = "remove" +external remove: (t, int) => unit = "remove" /** Removes all the entries in the drag data store. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/clear) */ @send -external clear: UiEventsTypes.dataTransferItemList => unit = "clear" +external clear: t => unit = "clear" diff --git a/src/fetch/FetchTypes.res b/src/fetch/FetchTypes.res index 7a4648fd..27e21ff7 100644 --- a/src/fetch/FetchTypes.res +++ b/src/fetch/FetchTypes.res @@ -208,7 +208,7 @@ Provides a way to easily construct a set of key/value pairs representing form fi [See FormData on MDN](https://developer.mozilla.org/docs/Web/API/FormData) */ @editor.completeFrom(FormData) -type formData = private {} +type formData = FormData.t = private {...FormData.t} @editor.completeFrom(HeadersInit) type headersInit @@ -217,9 +217,7 @@ type formData = private {} type requestInfo = unknown @editor.completeFrom(FormDataEntryValue) @unboxed -type formDataEntryValue = - | String(string) - | File(FileTypes.file) +type formDataEntryValue = FormDataEntryValue.t = | ...FormDataEntryValue.t type requestInit = { /** diff --git a/src/fetch/FormDataEntryValue.res b/src/fetch/FormDataEntryValue.res deleted file mode 100644 index da0973b2..00000000 --- a/src/fetch/FormDataEntryValue.res +++ /dev/null @@ -1,2 +0,0 @@ -@unboxed -type t = FetchTypes.formDataEntryValue = | ...FetchTypes.formDataEntryValue diff --git a/src/file/BaseFileAndDirectoryEntries.res b/src/file-entries/BaseFileAndDirectoryEntries.res similarity index 100% rename from src/file/BaseFileAndDirectoryEntries.res rename to src/file-entries/BaseFileAndDirectoryEntries.res diff --git a/src/file/FileAndDirectoryEntriesTypes.res b/src/file-entries/FileAndDirectoryEntriesTypes.res similarity index 100% rename from src/file/FileAndDirectoryEntriesTypes.res rename to src/file-entries/FileAndDirectoryEntriesTypes.res diff --git a/src/file/FileSystemDirectoryEntry.res b/src/file-entries/FileSystemDirectoryEntry.res similarity index 100% rename from src/file/FileSystemDirectoryEntry.res rename to src/file-entries/FileSystemDirectoryEntry.res diff --git a/src/file/FileSystemDirectoryReader.res b/src/file-entries/FileSystemDirectoryReader.res similarity index 100% rename from src/file/FileSystemDirectoryReader.res rename to src/file-entries/FileSystemDirectoryReader.res diff --git a/src/file/FileSystemEntry.res b/src/file-entries/FileSystemEntry.res similarity index 100% rename from src/file/FileSystemEntry.res rename to src/file-entries/FileSystemEntry.res diff --git a/src/fetch/FormData.res b/src/form-data/FormData.res similarity index 86% rename from src/fetch/FormData.res rename to src/form-data/FormData.res index c7388cf9..8ca8a777 100644 --- a/src/fetch/FormData.res +++ b/src/form-data/FormData.res @@ -1,7 +1,7 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData) */ -type t = FetchTypes.formData = private {...FetchTypes.formData} +type t = private {} type formDataEntryValue = FormDataEntryValue.t @@ -21,7 +21,8 @@ external append: (t, ~name: string, ~value: string) => unit = "append" [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/append) */ @send -external appendBlob: (t, ~name: string, ~blobValue: Blob.t, ~filename: string=?) => unit = "append" +external appendBlob: (t, ~name: string, ~blobValue: DOM.blob, ~filename: string=?) => unit = + "append" /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/delete) @@ -69,4 +70,4 @@ external set: (t, ~name: string, ~value: string) => unit = "set" [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/set) */ @send -external setBlob: (t, ~name: string, ~blobValue: Blob.t, ~filename: string=?) => unit = "set" +external setBlob: (t, ~name: string, ~blobValue: DOM.blob, ~filename: string=?) => unit = "set" diff --git a/src/form-data/FormDataEntryValue.res b/src/form-data/FormDataEntryValue.res new file mode 100644 index 00000000..87c81187 --- /dev/null +++ b/src/form-data/FormDataEntryValue.res @@ -0,0 +1,4 @@ +@unboxed +type t = + | String(string) + | File(DOM.file) diff --git a/src/touch/Touch.res b/src/touch/Touch.res new file mode 100644 index 00000000..0d6b3e52 --- /dev/null +++ b/src/touch/Touch.res @@ -0,0 +1,79 @@ +type touchType = + | @as("direct") Direct + | @as("stylus") Stylus + +@editor.completeFrom(Touch) +type t = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/identifier) + */ + identifier: int, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/target) + */ + target: DOM.eventTarget, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/screenX) + */ + screenX: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/screenY) + */ + screenY: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/clientX) + */ + clientX: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/clientY) + */ + clientY: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/pageX) + */ + pageX: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/pageY) + */ + pageY: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/radiusX) + */ + radiusX: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/radiusY) + */ + radiusY: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/rotationAngle) + */ + rotationAngle: float, + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/force) + */ + force: float, +} + +type init = { + mutable identifier: int, + mutable target: DOM.eventTarget, + mutable clientX?: float, + mutable clientY?: float, + mutable screenX?: float, + mutable screenY?: float, + mutable pageX?: float, + mutable pageY?: float, + mutable radiusX?: float, + mutable radiusY?: float, + mutable rotationAngle?: float, + mutable force?: float, + mutable altitudeAngle?: float, + mutable azimuthAngle?: float, + mutable touchType?: touchType, +} + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch) +*/ +@new +external make: init => t = "Touch" diff --git a/src/touch/TouchList.res b/src/touch/TouchList.res new file mode 100644 index 00000000..5d4848ab --- /dev/null +++ b/src/touch/TouchList.res @@ -0,0 +1,13 @@ +@editor.completeFrom(TouchList) +type t = private { + /** + [Read more on MDN](https://developer.mozilla.org/docs/Web/API/TouchList/length) + */ + length: int, +} + +/** +[Read more on MDN](https://developer.mozilla.org/docs/Web/API/TouchList/item) +*/ +@send +external item: (t, int) => Null.t = "item" diff --git a/src/ui-events/DataTransfer.res b/src/ui-events/DataTransfer.res deleted file mode 100644 index 4db56003..00000000 --- a/src/ui-events/DataTransfer.res +++ /dev/null @@ -1,40 +0,0 @@ -type t = UiEventsTypes.dataTransfer = {...UiEventsTypes.dataTransfer} - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer) -*/ -@new -external make: unit => UiEventsTypes.dataTransfer = "DataTransfer" - -/** -Uses the given element to update the drag feedback, replacing any previously specified feedback. -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/setDragImage) -*/ -@send -external setDragImage: ( - UiEventsTypes.dataTransfer, - ~image: DOMTree.element, - ~x: int, - ~y: int, -) => unit = "setDragImage" - -/** -Returns the specified data. If there is no such data, returns the empty string. -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/getData) -*/ -@send -external getData: (UiEventsTypes.dataTransfer, string) => string = "getData" - -/** -Adds the specified data. -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/setData) -*/ -@send -external setData: (UiEventsTypes.dataTransfer, ~format: string, ~data: string) => unit = "setData" - -/** -Removes the data of the specified formats. Removes all data if the argument is omitted. -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/clearData) -*/ -@send -external clearData: (UiEventsTypes.dataTransfer, ~format: string=?) => unit = "clearData" diff --git a/src/ui-events/DataTransferItem.res b/src/ui-events/DataTransferItem.res deleted file mode 100644 index d3b73953..00000000 --- a/src/ui-events/DataTransferItem.res +++ /dev/null @@ -1,23 +0,0 @@ -type t = UiEventsTypes.dataTransferItem = private {...UiEventsTypes.dataTransferItem} - -/** -Invokes the callback with the string data as the argument, if the drag data item kind is text. -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/getAsString) -*/ -@send -external getAsString: (UiEventsTypes.dataTransferItem, string => unit) => unit = "getAsString" - -/** -Returns a WebApiFile object, if the drag data item kind is File. -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/getAsFile) -*/ -@send -external getAsFile: UiEventsTypes.dataTransferItem => Null.t = "getAsFile" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/webkitGetAsEntry) -*/ -@send -external webkitGetAsEntry: UiEventsTypes.dataTransferItem => Null.t< - FileAndDirectoryEntriesTypes.fileSystemEntry, -> = "webkitGetAsEntry" diff --git a/src/ui-events/Touch.res b/src/ui-events/Touch.res deleted file mode 100644 index 94885854..00000000 --- a/src/ui-events/Touch.res +++ /dev/null @@ -1,7 +0,0 @@ -type t = UiEventsTypes.touch = private {...UiEventsTypes.touch} - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch) -*/ -@new -external make: UiEventsTypes.touchInit => UiEventsTypes.touch = "Touch" diff --git a/src/ui-events/TouchList.res b/src/ui-events/TouchList.res deleted file mode 100644 index 2718ce1d..00000000 --- a/src/ui-events/TouchList.res +++ /dev/null @@ -1,7 +0,0 @@ -type t = UiEventsTypes.touchList = private {...UiEventsTypes.touchList} - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/TouchList/item) -*/ -@send -external item: (UiEventsTypes.touchList, int) => Null.t = "item" diff --git a/src/ui-events/UiEventsTypes.res b/src/ui-events/UiEventsTypes.res index e9f8a8fd..405eda64 100644 --- a/src/ui-events/UiEventsTypes.res +++ b/src/ui-events/UiEventsTypes.res @@ -1,8 +1,6 @@ @@warning("-30") -type touchType = - | @as("direct") Direct - | @as("stylus") Stylus +type touchType = Touch.touchType = | ...Touch.touchType /** Simple user interface events. @@ -52,32 +50,14 @@ One drag data item. During a drag operation, each drag event has a dataTransfer [See DataTransferItem on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem) */ @editor.completeFrom(DataTransferItem) -type dataTransferItem = private { - /** - Returns the drag data item kind, one of: "string", "file". - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/kind) - */ - kind: string, - /** - Returns the drag data item type string. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/type) - */ - @as("type") - type_: string, -} +type dataTransferItem = DataTransferItem.t = private {...DataTransferItem.t} /** A list of DataTransferItem objects representing items being dragged. During a drag operation, each DragEvent has a dataTransfer property and that property is a DataTransferItemList. [See DataTransferItemList on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList) */ @editor.completeFrom(DataTransferItemList) -type dataTransferItemList = private { - /** - Returns the number of items in the drag data store. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/length) - */ - length: int, -} +type dataTransferItemList = DataTransferItemList.t = private {...DataTransferItemList.t} /** Used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. @@ -85,41 +65,7 @@ Used to hold the data that is being dragged during a drag and drop operation. It TODO: mark as private once mutating fields of private records is allowed */ @editor.completeFrom(DataTransfer) -type dataTransfer = { - /** - Returns the kind of operation that is currently selected. If the kind of operation isn't one of those that is allowed by the effectAllowed attribute, then the operation will fail. - -Can be set, to change the selected operation. - -The possible values are "none", "copy", "link", and "move". - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/dropEffect) - */ - mutable dropEffect: string, - /** - Returns the kinds of operations that are to be allowed. - -Can be set (during the dragstart event), to change the allowed operations. - -The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized", - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/effectAllowed) - */ - mutable effectAllowed: string, - /** - Returns a DataTransferItemList object, with the drag data. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/items) - */ - items: dataTransferItemList, - /** - Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files". - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/types) - */ - types: array, - /** - Returns a FileList of the files being dragged, if any. - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer/files) - */ - files: DOM.fileList, -} +type dataTransfer = DataTransfer.t = {...DataTransfer.t} /** [See InputEvent on MDN](https://developer.mozilla.org/docs/Web/API/InputEvent) @@ -313,68 +259,14 @@ A single contact point on a touch-sensitive device. The contact point is commonl [See Touch on MDN](https://developer.mozilla.org/docs/Web/API/Touch) */ @editor.completeFrom(Touch) -type touch = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/identifier) - */ - identifier: int, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/target) - */ - target: DOM.eventTarget, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/screenX) - */ - screenX: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/screenY) - */ - screenY: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/clientX) - */ - clientX: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/clientY) - */ - clientY: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/pageX) - */ - pageX: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/pageY) - */ - pageY: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/radiusX) - */ - radiusX: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/radiusY) - */ - radiusY: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/rotationAngle) - */ - rotationAngle: float, - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch/force) - */ - force: float, -} +type touch = Touch.t = private {...Touch.t} /** A list of contact points on a touch surface. For example, if the user has three fingers on the touch surface (such as a screen or trackpad), the corresponding TouchList object would have one Touch object for each finger, for a total of three entries. [See TouchList on MDN](https://developer.mozilla.org/docs/Web/API/TouchList) */ @editor.completeFrom(TouchList) -type touchList = private { - /** - [Read more on MDN](https://developer.mozilla.org/docs/Web/API/TouchList/length) - */ - length: int, -} +type touchList = TouchList.t = private {...TouchList.t} /** An event sent when the state of contacts with a touch-sensitive surface changes. This surface can be a touch screen or trackpad, for example. The event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth. @@ -546,23 +438,7 @@ type inputEventInit = { mutable targetRanges?: array, } -type touchInit = { - mutable identifier: int, - mutable target: DOM.eventTarget, - mutable clientX?: float, - mutable clientY?: float, - mutable screenX?: float, - mutable screenY?: float, - mutable pageX?: float, - mutable pageY?: float, - mutable radiusX?: float, - mutable radiusY?: float, - mutable rotationAngle?: float, - mutable force?: float, - mutable altitudeAngle?: float, - mutable azimuthAngle?: float, - mutable touchType?: touchType, -} +type touchInit = Touch.init = {...Touch.init} type pointerEventInit = { ...mouseEventInit, diff --git a/tests/NarrowDataAliases__test.res b/tests/NarrowDataAliases__test.res new file mode 100644 index 00000000..bbf19470 --- /dev/null +++ b/tests/NarrowDataAliases__test.res @@ -0,0 +1,28 @@ +// These equalities must survive the move in both directions. +let touchToPublic = (value: UiEventsTypes.touch): Touch.t => value +let touchFromPublic = (value: Touch.t): UiEventsTypes.touch => value +let listToPublic = (value: UiEventsTypes.touchList): TouchList.t => value +let listFromPublic = (value: TouchList.t): UiEventsTypes.touchList => value +let transferToPublic = (value: UiEventsTypes.dataTransfer): DataTransfer.t => value +let transferFromPublic = (value: DataTransfer.t): UiEventsTypes.dataTransfer => value +let itemToPublic = (value: UiEventsTypes.dataTransferItem): DataTransferItem.t => value +let itemFromPublic = (value: DataTransferItem.t): UiEventsTypes.dataTransferItem => value +let itemsToPublic = (value: UiEventsTypes.dataTransferItemList): DataTransferItemList.t => value +let itemsFromPublic = (value: DataTransferItemList.t): UiEventsTypes.dataTransferItemList => value +let formToPublic = (value: FetchTypes.formData): FormData.t => value +let formFromPublic = (value: FormData.t): FetchTypes.formData => value +let entryToPublic = (value: FetchTypes.formDataEntryValue): FormDataEntryValue.t => value +let entryFromPublic = (value: FormDataEntryValue.t): FetchTypes.formDataEntryValue => value +let initToPublic = (value: UiEventsTypes.touchInit): Touch.init => value +let initFromPublic = (value: Touch.init): UiEventsTypes.touchInit => value +let oldDirect: Touch.touchType = UiEventsTypes.Direct +let oldStylus: Touch.touchType = UiEventsTypes.Stylus +let oldString: FormDataEntryValue.t = FetchTypes.String("string") +let oldFile = (file: DOM.file): FormDataEntryValue.t => FetchTypes.File(file) +let body = (form: FormData.t) => form->BodyInit.fromFormData +let response = (form: FetchTypes.formData) => Response.fromFormData(form) +let input = (event: UiEventsTypes.inputEvent): Null.t => event.dataTransfer +let touches = (event: UiEventsTypes.touchEvent): TouchList.t => event.touches + +let beacon = (navigator: Navigator.t, form: FormData.t) => + navigator->Navigator.sendBeacon5(~url="/beacon", ~data=form) diff --git a/tests/browser/NarrowData__test.res b/tests/browser/NarrowData__test.res new file mode 100644 index 00000000..bf6cbe59 --- /dev/null +++ b/tests/browser/NarrowData__test.res @@ -0,0 +1,40 @@ +let transfer = DataTransfer.make() +transfer->DataTransfer.setData(~format="text/plain", ~data="clipboard") +assert(transfer->DataTransfer.getData("text/plain") == "clipboard") +// Chromium ignores drag-effect changes outside an active native drag session. +// Keep the writable binding compile-checked, without assuming a synthetic session. +transfer.dropEffect = "copy" +transfer->DataTransfer.clearData(~format="text/plain") +assert(transfer->DataTransfer.getData("text/plain") == "") +let file = File.make(~fileBits=[String("data")], ~fileName="transfer.txt") +let item = transfer.items->DataTransferItemList.addFile(file)->Null.toOption + +switch item { +| Some(item) => + let recovered = item->DataTransferItem.getAsFile->Null.toOption + assert(switch recovered { + | Some(value) => value.name == "transfer.txt" + | None => false + }) + assert(item->DataTransferItem.webkitGetAsEntry->Null.toOption == None) +| None => assert(false) +} + +assert(transfer.files.length == 1) +let emptyTransfer = DataTransfer.make() +assert(emptyTransfer.items.length == 0) + +// Chromium is the supported runner; fail explicitly if Touch construction is absent. +let touchSupported: bool = %raw(`typeof Touch === "function" && typeof TouchEvent === "function"`) +assert(touchSupported) +let target: DOM.eventTarget = %raw(`document.body`) +let touch = Touch.make({identifier: 7, target, clientX: 12.5, touchType: Touch.Direct}) +assert(touch.identifier == 7 && touch.clientX == 12.5) +let event = TouchEvent.make(~type_="touchstart", ~eventInitDict={touches: [touch]}) +assert(event.touches.length == 1) +assert(event.touches->TouchList.item(1)->Null.toOption == None) + +assert(switch event.touches->TouchList.item(0)->Null.toOption { +| Some(value) => value.identifier == 7 +| None => false +}) diff --git a/tests/fixtures.json b/tests/fixtures.json index f066adb1..efce5575 100644 --- a/tests/fixtures.json +++ b/tests/fixtures.json @@ -35,7 +35,8 @@ "WebSocketsAPI/WebSocket__test.res", "WebStorageAPI/Storage__test.res", "WebWorkersAPI/SharedWorkerScope__test.res", - "WebWorkersAPI/SharedWorker__test.res" + "WebWorkersAPI/SharedWorker__test.res", + "NarrowDataAliases__test.res" ], "documentationExamples": ["Fetch__test.res", "VisualViewport__test.res"], "nodeRuntime": [ @@ -47,5 +48,9 @@ "FetchAPI/URLSearchParams__test.res", "URLAPI/URL__test.res" ], - "browserRuntime": ["browser/BindingContracts__test.res", "browser/NativeAPI__test.res"] + "browserRuntime": [ + "browser/BindingContracts__test.res", + "browser/NativeAPI__test.res", + "browser/NarrowData__test.res" + ] }