buninu-browser 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +13 -0
- package/Architecture.md +601 -0
- package/LICENSE +21 -0
- package/LICENSES/Apache-2.0.txt +202 -0
- package/LICENSES/BSD-3-Clause-Skia.txt +29 -0
- package/LICENSES/Bitstream-Vera.txt +44 -0
- package/LICENSES/CC-BY-4.0.txt +396 -0
- package/LICENSES/OFL-1.1.txt +91 -0
- package/LICENSES/README.md +9 -0
- package/LICENSES/acorn.txt +21 -0
- package/LICENSES/chromium.txt +27 -0
- package/LICENSES/dropflow.txt +19 -0
- package/LICENSES/emscripten.txt +102 -0
- package/LICENSES/freetype.txt +169 -0
- package/LICENSES/happy-dom.txt +22 -0
- package/LICENSES/harfbuzz.txt +42 -0
- package/LICENSES/icu.txt +512 -0
- package/LICENSES/libjpeg-ijg.txt +260 -0
- package/LICENSES/libjpeg-turbo.txt +147 -0
- package/LICENSES/libpng.txt +134 -0
- package/LICENSES/libwebp.txt +30 -0
- package/LICENSES/ses-aura.txt +16 -0
- package/LICENSES/ses-caja.txt +13 -0
- package/LICENSES/ses-corejs.txt +19 -0
- package/LICENSES/ses-v8.txt +9 -0
- package/LICENSES/ses.txt +201 -0
- package/LICENSES/termdom.txt +21 -0
- package/LICENSES/wasmpeg.txt +501 -0
- package/LICENSES/woff2.txt +19 -0
- package/LICENSES/wuffs.txt +211 -0
- package/LICENSES/zlib.txt +22 -0
- package/Linux +0 -0
- package/PORTING.md +825 -0
- package/README.md +283 -0
- package/THIRD_PARTY_NOTICES.md +224 -0
- package/bunfig.toml +2 -0
- package/buninu-browser.js +65 -0
- package/index.js +149 -0
- package/lib/cdp-server.js +1424 -0
- package/lib/cdp.js +203 -0
- package/lib/happy-dom/entities-adapter.js +51 -0
- package/lib/happy-dom/image-size-adapter.js +8 -0
- package/lib/happy-dom/mime-type-adapter.js +27 -0
- package/lib/happy-dom/parser.js +53 -0
- package/lib/happy-dom/websocket-adapter.js +62 -0
- package/lib/headless-shell.js +362 -0
- package/lib/input/hit-test.js +78 -0
- package/lib/layout/scroll-viewport.js +53 -0
- package/lib/layout/text-layout.js +2236 -0
- package/lib/log.js +85 -0
- package/lib/network/cookie-jar.js +178 -0
- package/lib/network/network-service.js +268 -0
- package/lib/network/resolver.js +97 -0
- package/lib/paint/display-list.js +359 -0
- package/lib/paint/frame.js +88 -0
- package/lib/paint/gradient.js +207 -0
- package/lib/render-tree/index.js +263 -0
- package/lib/render-tree/svg.js +210 -0
- package/lib/renderer/bindings.js +1291 -0
- package/lib/renderer/compositor.js +123 -0
- package/lib/renderer/flags.js +20 -0
- package/lib/renderer/host.js +503 -0
- package/lib/renderer/main.js +234 -0
- package/lib/renderer/module-transform.js +399 -0
- package/lib/renderer/page-realm.js +1471 -0
- package/lib/renderer/page-renderer.js +1691 -0
- package/lib/renderer/script-rewrite.js +232 -0
- package/lib/renderer/seccomp.js +215 -0
- package/lib/renderer/syscall-numbers.js +139 -0
- package/lib/style/computed-style.js +2053 -0
- package/package.json +39 -0
- package/patches/happy-dom/0001-use-bun-entity-adapter.patch +15 -0
- package/patches/happy-dom/0002-use-bun-platform-adapters.patch +69 -0
- package/patches/happy-dom/README.md +38 -0
- package/test/chromium-headless-shell +5 -0
- package/test/compositor.test.js +154 -0
- package/test/computed-style.test.js +434 -0
- package/test/display-list.test.js +128 -0
- package/test/entities-adapter.test.js +43 -0
- package/test/fixtures/fake-renderer.js +26 -0
- package/test/fixtures/seccomp-child.js +32 -0
- package/test/fixtures/video.mp4 +0 -0
- package/test/flex.test.js +150 -0
- package/test/gradient.test.js +56 -0
- package/test/grid.test.js +253 -0
- package/test/happy-dom-platform-adapters.test.js +18 -0
- package/test/headless-shell.test.js +318 -0
- package/test/hit-test.test.js +49 -0
- package/test/html-parser.test.js +40 -0
- package/test/index.test.js +29 -0
- package/test/log.test.js +40 -0
- package/test/mobile.test.js +85 -0
- package/test/network-service.test.js +214 -0
- package/test/page-scripts.test.js +552 -0
- package/test/poc-backend.js +189 -0
- package/test/poc-backend.test.js +154 -0
- package/test/positioning.test.js +112 -0
- package/test/render-tree.test.js +103 -0
- package/test/renderer-host.test.js +69 -0
- package/test/resolver.test.js +51 -0
- package/test/script-rewrite.test.js +31 -0
- package/test/scroll-viewport.test.js +25 -0
- package/test/seccomp.test.js +71 -0
- package/test/site-isolation.test.js +74 -0
- package/test/svg.test.js +61 -0
- package/test/text-layout.test.js +419 -0
- package/usr/README.md +20 -0
- package/usr/lib/canvaskit/LICENSE +29 -0
- package/usr/lib/canvaskit/canvaskit.js +264 -0
- package/usr/lib/canvaskit/canvaskit.wasm +0 -0
- package/usr/share/fonts/DejaVuSansMono-Bold.ttf +0 -0
- package/usr/share/fonts/DejaVuSansMono.ttf +0 -0
- package/usr/share/fonts/LICENSE-Apache-2.0.txt +202 -0
- package/usr/share/fonts/LICENSE-DejaVu.txt +44 -0
- package/usr/share/fonts/LICENSE-OFL-1.1.txt +91 -0
- package/usr/share/fonts/NotoColorEmoji.ttf +0 -0
- package/usr/share/fonts/NotoColorEmojiFlags.ttf +0 -0
- package/usr/share/fonts/NotoSansCJK-Regular.ttc +0 -0
- package/usr/share/fonts/NotoSansSymbols-Regular-Subsetted.ttf +0 -0
- package/usr/share/fonts/NotoSansSymbols-Regular-Subsetted2.ttf +0 -0
- package/usr/share/fonts/Roboto-Regular.ttf +0 -0
- package/usr/share/fonts/fonts.json +28 -0
- package/vendor/acorn/LICENSE +21 -0
- package/vendor/acorn/README.md +309 -0
- package/vendor/acorn/dist/acorn.mjs +6313 -0
- package/vendor/acorn/package.json +50 -0
- package/vendor/happy-dom/.editorconfig +8 -0
- package/vendor/happy-dom/.eslintignore +6 -0
- package/vendor/happy-dom/.eslintrc.cjs +188 -0
- package/vendor/happy-dom/.github/CODEOWNERS +2 -0
- package/vendor/happy-dom/.github/FUNDING.yml +1 -0
- package/vendor/happy-dom/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/vendor/happy-dom/.github/ISSUE_TEMPLATE/custom.md +10 -0
- package/vendor/happy-dom/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/vendor/happy-dom/.github/PULL_REQUEST_TEMPLATE.md +27 -0
- package/vendor/happy-dom/.github/workflows/auto-assign.yml +23 -0
- package/vendor/happy-dom/.github/workflows/pull_request.yml +53 -0
- package/vendor/happy-dom/.github/workflows/release.yml +143 -0
- package/vendor/happy-dom/.husky/pre-commit +1 -0
- package/vendor/happy-dom/.prettierignore +1 -0
- package/vendor/happy-dom/.prettierrc.cjs +6 -0
- package/vendor/happy-dom/.vscode/extensions.json +3 -0
- package/vendor/happy-dom/CODE_OF_CONDUCT.md +128 -0
- package/vendor/happy-dom/CONTRIBUTING.md +147 -0
- package/vendor/happy-dom/LICENSE +21 -0
- package/vendor/happy-dom/README.md +62 -0
- package/vendor/happy-dom/SECURITY.md +12 -0
- package/vendor/happy-dom/cspell.json +34 -0
- package/vendor/happy-dom/docs/happy-dom-logo.jpg +0 -0
- package/vendor/happy-dom/integration-test/.editorconfig +8 -0
- package/vendor/happy-dom/integration-test/LICENSE +21 -0
- package/vendor/happy-dom/integration-test/README.md +1 -0
- package/vendor/happy-dom/integration-test/package.json +24 -0
- package/vendor/happy-dom/package-lock.json +15520 -0
- package/vendor/happy-dom/package.json +55 -0
- package/vendor/happy-dom/packages/@happy-dom/global-registrator/LICENSE +21 -0
- package/vendor/happy-dom/packages/@happy-dom/global-registrator/README.md +60 -0
- package/vendor/happy-dom/packages/@happy-dom/global-registrator/package.json +52 -0
- package/vendor/happy-dom/packages/@happy-dom/global-registrator/register.js +2 -0
- package/vendor/happy-dom/packages/@happy-dom/global-registrator/src/GlobalRegistrator.ts +121 -0
- package/vendor/happy-dom/packages/@happy-dom/global-registrator/src/index.ts +3 -0
- package/vendor/happy-dom/packages/@happy-dom/global-registrator/tsconfig.json +30 -0
- package/vendor/happy-dom/packages/@happy-dom/jest-environment/LICENSE +21 -0
- package/vendor/happy-dom/packages/@happy-dom/jest-environment/README.md +71 -0
- package/vendor/happy-dom/packages/@happy-dom/jest-environment/package.json +93 -0
- package/vendor/happy-dom/packages/@happy-dom/jest-environment/src/index.ts +192 -0
- package/vendor/happy-dom/packages/@happy-dom/jest-environment/tsconfig.json +30 -0
- package/vendor/happy-dom/packages/@happy-dom/node-canvas-adapter/README.md +48 -0
- package/vendor/happy-dom/packages/@happy-dom/node-canvas-adapter/package.json +41 -0
- package/vendor/happy-dom/packages/@happy-dom/node-canvas-adapter/src/CanvasAdapter.ts +275 -0
- package/vendor/happy-dom/packages/@happy-dom/node-canvas-adapter/src/index.ts +1 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/LICENSE +21 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/README.md +100 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/bin/src/happy-dom-sr.ts +30 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/package.json +62 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRenderer.ts +368 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererBrowser.ts +142 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererBrowserWorker.ts +29 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererPage.ts +305 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererPageWorker.ts +55 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererServer.ts +332 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/config/DefaultServerRendererConfiguration.ts +47 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/enums/ServerRendererLogLevelEnum.ts +9 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/enums/ServerRendererModeEnum.ts +8 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/index.ts +19 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/types/IOptionalServerRendererConfiguration.ts +127 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/types/IServerRendererConfiguration.ts +126 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/types/IServerRendererItem.ts +6 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/types/IServerRendererResult.ts +11 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/BrowserWindowPolyfill.ts +138 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/HelpPrinter.ts +36 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/HelpPrinterRows.ts +288 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/PackageVersion.ts +12 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/ProcessArgumentsParser.ts +387 -0
- package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/ServerRendererConfigurationFactory.ts +91 -0
- package/vendor/happy-dom/packages/happy-dom/LICENSE +21 -0
- package/vendor/happy-dom/packages/happy-dom/README.md +42 -0
- package/vendor/happy-dom/packages/happy-dom/package.json +58 -0
- package/vendor/happy-dom/packages/happy-dom/src/PropertySymbol.ts +431 -0
- package/vendor/happy-dom/packages/happy-dom/src/animation/Animation.ts +273 -0
- package/vendor/happy-dom/packages/happy-dom/src/animation/AnimationTimeline.ts +15 -0
- package/vendor/happy-dom/packages/happy-dom/src/animation/DocumentTimeline.ts +33 -0
- package/vendor/happy-dom/packages/happy-dom/src/animation/KeyframeEffect.ts +295 -0
- package/vendor/happy-dom/packages/happy-dom/src/async-task-manager/AsyncTaskManager.ts +340 -0
- package/vendor/happy-dom/packages/happy-dom/src/async-task-manager/AsyncTaskManagerDebugError.ts +14 -0
- package/vendor/happy-dom/packages/happy-dom/src/base64/Base64.ts +97 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/Browser.ts +123 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/BrowserContext.ts +100 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/BrowserFrame.ts +232 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/BrowserPage.ts +205 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/BrowserSettingsFactory.ts +96 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/DefaultBrowserSettings.ts +67 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/detached-browser/DetachedBrowser.ts +129 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/detached-browser/DetachedBrowserContext.ts +103 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/detached-browser/DetachedBrowserFrame.ts +250 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/detached-browser/DetachedBrowserPage.ts +218 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/enums/BrowserErrorCaptureEnum.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/enums/BrowserNavigationCrossOriginPolicyEnum.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowser.ts +51 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserContext.ts +44 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserFrame.ts +112 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserPage.ts +110 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserPageViewport.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserSettings.ts +194 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IGoToOptions.ts +17 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IOptionalBrowserPageViewport.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IOptionalBrowserSettings.ts +190 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/types/IReloadOptions.ts +27 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserExceptionObserver.ts +123 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameFactory.ts +106 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameNavigator.ts +574 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameScriptEvaluator.ts +71 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameURL.ts +30 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameValidator.ts +84 -0
- package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserPageUtility.ts +56 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasAdapter.ts +63 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasAdapterCaller.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasGradient.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasPattern.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasRenderingContext2D.ts +162 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasShape.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/IImageBitmapOptions.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ITextMetrics.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ImageBitmap.ts +162 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/ImageData.ts +83 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/OffscreenCanvas.ts +162 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/TCanvasImage.ts +14 -0
- package/vendor/happy-dom/packages/happy-dom/src/canvas/TImageBitmapSource.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/clipboard/Clipboard.ts +108 -0
- package/vendor/happy-dom/packages/happy-dom/src/clipboard/ClipboardItem.ts +57 -0
- package/vendor/happy-dom/packages/happy-dom/src/config/HTMLElementConfig.ts +536 -0
- package/vendor/happy-dom/packages/happy-dom/src/config/HTMLElementConfigContentModelEnum.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/config/IHTMLElementTagNameMap.ts +181 -0
- package/vendor/happy-dom/packages/happy-dom/src/config/ISVGElementTagNameMap.ts +127 -0
- package/vendor/happy-dom/packages/happy-dom/src/config/NamespaceURI.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/config/SVGElementConfig.ts +70 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/IConsole.ts +161 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/IVirtualConsoleLogEntry.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/IVirtualConsoleLogGroup.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/IVirtualConsolePrinter.ts +58 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/VirtualConsole.ts +363 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/VirtualConsolePrinter.ts +148 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/enums/VirtualConsoleLogLevelEnum.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/enums/VirtualConsoleLogTypeEnum.ts +29 -0
- package/vendor/happy-dom/packages/happy-dom/src/console/utilities/VirtualConsoleLogEntryStringifier.ts +100 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/CookieContainer.ts +91 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/DefaultCookie.ts +17 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/ICookie.ts +14 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/ICookieContainer.ts +33 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/IOptionalCookie.ts +16 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/enums/CookieSameSiteEnum.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/urilities/CookieExpireUtility.ts +16 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/urilities/CookieStringUtility.ts +119 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie/urilities/CookieURLUtility.ts +27 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie-store/CookieStore.ts +226 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie-store/ICookieStoreDeleteOptions.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie-store/ICookieStoreGetOptions.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie-store/ICookieStoreItem.ts +13 -0
- package/vendor/happy-dom/packages/happy-dom/src/cookie-store/ICookieStoreSetOptions.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/CSS.ts +63 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/CSSRule.ts +84 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/CSSRuleTypeEnum.ts +18 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/CSSStyleSheet.ts +141 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/CSSUnitValue.ts +26 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/CSSUnits.ts +31 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/MediaList.ts +177 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/CSSPropertyList.ts +1273 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/CSSStyleDeclaration.ts +355 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/ICSSStyleDeclaration.ts +1178 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/computed-style/CSSComputedStyle.ts +502 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/computed-style/config/CSSComputedStyleElementDefault.ts +133 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/computed-style/config/CSSComputedStyleInheritedProperties.ts +39 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/computed-style/config/CSSComputedStyleMeasurementProperties.ts +41 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/CSSPropertyManager.ts +641 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/parsers/CSSPropertyGetParser.ts +741 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/parsers/CSSPropertySetParser.ts +2955 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/types/ICSSPropertyMap.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/types/ICSSPropertyValue.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/utilities/CSSStringUtility.ts +90 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/utilities/CSSValueFormatter.ts +447 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/utilities/CSSVariableFormatter.ts +76 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/utilities/CSSMeasurementConverter.ts +79 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/declaration/utilities/CSSTextParser.ts +44 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSConditionRule.ts +20 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSContainerRule.ts +34 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSFontFaceRule.ts +45 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSGroupingRule.ts +84 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSKeyframeRule.ts +53 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSKeyframesRule.ts +147 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSMediaRule.ts +50 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSScopeRule.ts +53 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSStyleRule.ts +73 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSSupportsRule.ts +30 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/style-property-map/CSSKeywordValue.ts +35 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/style-property-map/CSSStyleValue.ts +37 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/style-property-map/StylePropertyMap.ts +45 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/style-property-map/StylePropertyMapReadOnly.ts +128 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/utilities/CSSEscaper.ts +87 -0
- package/vendor/happy-dom/packages/happy-dom/src/css/utilities/CSSRuleParser.ts +315 -0
- package/vendor/happy-dom/packages/happy-dom/src/custom-element/CustomElementReactionStack.ts +91 -0
- package/vendor/happy-dom/packages/happy-dom/src/custom-element/CustomElementRegistry.ts +186 -0
- package/vendor/happy-dom/packages/happy-dom/src/custom-element/CustomElementUtility.ts +34 -0
- package/vendor/happy-dom/packages/happy-dom/src/custom-element/ICustomElementDefinition.ts +16 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/DOMPoint.ts +84 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/DOMPointReadOnly.ts +117 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/DOMRect.ts +92 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/DOMRectList.ts +34 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/DOMRectReadOnly.ts +129 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/DOMStringMap.ts +93 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/DOMStringMapUtility.ts +33 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/DOMTokenList.ts +363 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/IDOMPointInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/IDOMRectInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/DOMMatrix.ts +526 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/DOMMatrixReadOnly.ts +1608 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/IDOMMatrixCompatibleObject.ts +24 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/IDOMMatrixJSON.ts +26 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/TDOMMatrix2DArray.ts +3 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/TDOMMatrix3DArray.ts +20 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/TDOMMatrixInit.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom-implementation/DOMImplementation.ts +81 -0
- package/vendor/happy-dom/packages/happy-dom/src/dom-parser/DOMParser.ts +47 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/DataTransfer.ts +128 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/DataTransferItem.ts +47 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/DataTransferItemList.ts +44 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/Event.ts +222 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/EventPhaseEnum.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/EventTarget.ts +396 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/IEventInit.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/IEventListenerOptions.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/ITouchInit.ts +16 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/IUIEventInit.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/MessagePort.ts +32 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/TEventListener.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/TEventListenerFunction.ts +3 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/TEventListenerObject.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/Touch.ts +40 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/UIEvent.ts +32 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/AnimationEvent.ts +25 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/ClipboardEvent.ts +22 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/CloseEvent.ts +25 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/CookieChangeEvent.ts +25 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/CustomEvent.ts +53 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/ErrorEvent.ts +29 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/FocusEvent.ts +22 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/HashChangeEvent.ts +25 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IAnimationEventInit.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IClipboardEventInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/ICloseEventInit.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/ICookieChangeEventInit.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/ICustomEventInit.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IErrorEventInit.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IFocusEventInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IHashChangeEventInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IInputEventInit.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IKeyboardEventInit.ts +23 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IMediaQueryListEventInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IMediaQueryListInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IMessageEventInit.ts +11 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IMouseEventInit.ts +21 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IPointerEventInit.ts +19 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IPopStateEventInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IProgressEventInit.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IStorageEventInit.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/ISubmitEventInit.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/ITouchEventInit.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/IWheelEventInit.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/InputEvent.ts +28 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/KeyboardEvent.ts +80 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/MediaQueryListEvent.ts +23 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/MediaStreamTrackEvent.ts +22 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/MessageEvent.ts +33 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/MouseEvent.ts +52 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/PointerEvent.ts +51 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/PopStateEvent.ts +23 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/ProgressEvent.ts +25 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/StorageEvent.ts +30 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/SubmitEvent.ts +22 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/TouchEvent.ts +34 -0
- package/vendor/happy-dom/packages/happy-dom/src/event/events/WheelEvent.ts +30 -0
- package/vendor/happy-dom/packages/happy-dom/src/exception/DOMException.ts +21 -0
- package/vendor/happy-dom/packages/happy-dom/src/exception/DOMExceptionNameEnum.ts +23 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/AbortController.ts +25 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/AbortSignal.ts +182 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/Fetch.ts +1072 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/Headers.ts +177 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/ReadableStreamWrapper.ts +30 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/Request.ts +492 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/ResourceFetch.ts +190 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/Response.ts +439 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/SyncFetch.ts +717 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/ICacheablePreflightRequest.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/ICacheablePreflightResponse.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/ICachedPreflightResponse.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/IPreflightResponseCache.ts +33 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/PreflightResponseCache.ts +94 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/CachedResponseStateEnum.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ICacheableRequest.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ICacheableResponse.ts +11 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ICachedResponse.ts +40 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/IResponseCache.ts +37 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/IResponseCacheFileSystem.ts +18 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ResponseCache.ts +248 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ResponseCacheFileSystem.ts +175 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/certificate/FetchHTTPSCertificate.ts +52 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/data-uri/DataURIParser.ts +66 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/multipart/MultipartFormDataParser.ts +174 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/multipart/MultipartReader.ts +216 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/preload/PreloadEntry.ts +50 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/preload/PreloadUtility.ts +33 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IFetchInterceptor.ts +60 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IFetchRequestHeaders.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IRequestInit.ts +23 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IResourceFetchResponse.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IResponseInit.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/ISyncResponse.ts +18 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IVirtualServer.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/THeadersInit.ts +3 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestBody.ts +14 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestCredentials.ts +1 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestInfo.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestMode.ts +1 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestRedirect.ts +1 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestReferrerPolicy.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TResponseBody.ts +14 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchBodyUtility.ts +284 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchCORSUtility.ts +23 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts +141 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchRequestReferrerUtility.ts +259 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchRequestValidationUtility.ts +128 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchResponseHeaderUtility.ts +48 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchResponseRedirectUtility.ts +27 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/SyncFetchScriptBuilder.ts +77 -0
- package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/VirtualServerUtility.ts +114 -0
- package/vendor/happy-dom/packages/happy-dom/src/file/Blob.ts +163 -0
- package/vendor/happy-dom/packages/happy-dom/src/file/File.ts +43 -0
- package/vendor/happy-dom/packages/happy-dom/src/file/FileReader.ts +211 -0
- package/vendor/happy-dom/packages/happy-dom/src/file/FileReaderEventTypeEnum.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/file/FileReaderFormatEnum.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/file/FileReaderReadyStateEnum.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/form-data/FormData.ts +291 -0
- package/vendor/happy-dom/packages/happy-dom/src/history/History.ts +220 -0
- package/vendor/happy-dom/packages/happy-dom/src/history/HistoryItemList.ts +72 -0
- package/vendor/happy-dom/packages/happy-dom/src/history/HistoryScrollRestorationEnum.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/history/IHistoryItem.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/html-parser/HTMLParser.ts +920 -0
- package/vendor/happy-dom/packages/happy-dom/src/html-serializer/HTMLSerializer.ts +172 -0
- package/vendor/happy-dom/packages/happy-dom/src/index.ts +495 -0
- package/vendor/happy-dom/packages/happy-dom/src/intersection-observer/IIntersectionObserverInit.ts +16 -0
- package/vendor/happy-dom/packages/happy-dom/src/intersection-observer/IntersectionObserver.ts +64 -0
- package/vendor/happy-dom/packages/happy-dom/src/intersection-observer/IntersectionObserverEntry.ts +26 -0
- package/vendor/happy-dom/packages/happy-dom/src/javascript/IJavaScriptCompiledResult.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/javascript/JavaScriptCompiler.ts +381 -0
- package/vendor/happy-dom/packages/happy-dom/src/location/Location.ts +319 -0
- package/vendor/happy-dom/packages/happy-dom/src/match-media/IMediaQueryRange.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/match-media/IMediaQueryRule.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/match-media/MediaQueryItem.ts +354 -0
- package/vendor/happy-dom/packages/happy-dom/src/match-media/MediaQueryList.ts +133 -0
- package/vendor/happy-dom/packages/happy-dom/src/match-media/MediaQueryParser.ts +113 -0
- package/vendor/happy-dom/packages/happy-dom/src/match-media/MediaQueryTypeEnum.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/CSSModule.ts +53 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/ECMAScriptModule.ts +194 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/ECMAScriptModuleCompiler.ts +961 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/JSONModule.ts +58 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/ModuleFactory.ts +148 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/ModuleURLUtility.ts +199 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/UnresolvedModule.ts +81 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/enums/ECMAScriptModuleEvaluateStateEnum.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IECMAScriptModuleCachedResult.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IECMAScriptModuleCompiledResult.ts +19 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IECMAScriptModuleImport.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IECMAScriptModuleInit.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IModule.ts +20 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IModuleImportMap.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IModuleImportMapRule.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IModuleImportMapScope.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IModuleInit.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/module/types/IResolveNodeModules.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/IMutationListener.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/IMutationObserverInit.ts +14 -0
- package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/MutationObserver.ts +175 -0
- package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/MutationObserverListener.ts +115 -0
- package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/MutationRecord.ts +55 -0
- package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/MutationTypeEnum.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/navigator/MimeType.ts +35 -0
- package/vendor/happy-dom/packages/happy-dom/src/navigator/MimeTypeArray.ts +48 -0
- package/vendor/happy-dom/packages/happy-dom/src/navigator/Navigator.ts +247 -0
- package/vendor/happy-dom/packages/happy-dom/src/navigator/Plugin.ts +61 -0
- package/vendor/happy-dom/packages/happy-dom/src/navigator/PluginArray.ts +58 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/NodeFactory.ts +38 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/attr/Attr.ts +119 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/character-data/CharacterData.ts +218 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/character-data/CharacterDataUtility.ts +68 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/child-node/ChildNodeUtility.ts +100 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/child-node/IChildNode.ts +29 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/child-node/INonDocumentTypeChildNode.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/child-node/NonDocumentChildNodeUtility.ts +37 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/comment/Comment.ts +36 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/document/Document.ts +2310 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/document/DocumentReadyStateEnum.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/document/DocumentReadyStateManager.ts +52 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/document/VisibilityStateEnum.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/document-fragment/DocumentFragment.ts +208 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/document-type/DocumentType.ts +70 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/element/Element.ts +1842 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/element/ElementEventAttributeUtility.ts +96 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/element/HTMLCollection.ts +228 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/element/NamedNodeMap.ts +274 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/element/NamedNodeMapProxyFactory.ts +127 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/element/THTMLCollectionListener.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/element/TNamedNodeMapListener.ts +3 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-anchor-element/HTMLAnchorElement.ts +439 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-area-element/HTMLAreaElement.ts +426 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-audio-element/Audio.ts +28 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-audio-element/HTMLAudioElement.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-base-element/HTMLBaseElement.ts +64 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-body-element/HTMLBodyElement.ts +161 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-br-element/HTMLBRElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-button-element/HTMLButtonElement.ts +406 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-canvas-element/CanvasCaptureMediaStreamTrack.ts +51 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-canvas-element/HTMLCanvasElement.ts +304 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-d-list-element/HTMLDListElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-data-element/HTMLDataElement.ts +25 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-data-list-element/HTMLDataListElement.ts +28 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-details-element/HTMLDetailsElement.ts +112 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-dialog-element/HTMLDialogElement.ts +104 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-div-element/HTMLDivElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-document/HTMLDocument.ts +82 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-element/HTMLElement.ts +1149 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-element/HTMLElementUtility.ts +119 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-embed-element/HTMLEmbedElement.ts +90 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-field-set-element/HTMLFieldSetElement.ts +165 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-form-element/HTMLFormControlsCollection.ts +35 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-form-element/HTMLFormElement.ts +675 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-form-element/RadioNodeList.ts +25 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-form-element/THTMLFormControlElement.ts +16 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-head-element/HTMLHeadElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-heading-element/HTMLHeadingElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-hr-element/HTMLHRElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-html-element/HTMLHtmlElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-hyperlink-element/HTMLHyperlinkElementUtility.ts +329 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-hyperlink-element/IHTMLHyperlinkElement.ts +19 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-iframe-element/HTMLIFrameElement.ts +460 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-image-element/HTMLImageElement.ts +500 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-image-element/Image.ts +33 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/FileList.ts +34 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElement.ts +1550 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementDateUtility.ts +50 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementSelectionDirectionEnum.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementSelectionModeEnum.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementValueSanitizer.ts +211 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementValueStepping.ts +92 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-label-element/HTMLLabelElement.ts +128 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-label-element/HTMLLabelElementUtility.ts +45 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-legend-element/HTMLLegendElement.ts +27 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-li-element/HTMLLIElement.ts +31 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-link-element/HTMLLinkElement.ts +501 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-map-element/HTMLMapElement.ts +47 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/HTMLMediaElement.ts +906 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/IMediaTrackCapabilities.ts +21 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/IMediaTrackSettings.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/MediaStream.ts +114 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/MediaStreamTrack.ts +182 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/RemotePlayback.ts +47 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrack.ts +156 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrackCue.ts +51 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrackCueList.ts +37 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrackKindEnum.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrackList.ts +182 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TimeRanges.ts +73 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/VTTCue.ts +80 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/VTTRegion.ts +15 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-menu-element/HTMLMenuElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-meta-element/HTMLMetaElement.ts +80 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-meter-element/HTMLMeterElement.ts +216 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-mod-element/HTMLModElement.ts +54 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-o-list-element/HTMLOListElement.ts +83 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-object-element/HTMLObjectElement.ts +223 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-opt-group-element/HTMLOptGroupElement.ts +53 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-option-element/HTMLOptionElement.ts +192 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-output-element/HTMLOutputElement.ts +179 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-paragraph-element/HTMLParagraphElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-param-element/HTMLParamElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-picture-element/HTMLPictureElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-pre-element/HTMLPreElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-progress-element/HTMLProgressElement.ts +100 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-quote-element/HTMLQuoteElement.ts +36 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-script-element/HTMLScriptElement.ts +735 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-select-element/HTMLOptionsCollection.ts +69 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-select-element/HTMLSelectElement.ts +779 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-slot-element/HTMLSlotElement.ts +249 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-source-element/HTMLSourceElement.ts +148 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-span-element/HTMLSpanElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-style-element/HTMLStyleElement.ts +125 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-caption-element/HTMLTableCaptionElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-cell-element/HTMLTableCellElement.ts +125 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-col-element/HTMLTableColElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-element/HTMLTableElement.ts +343 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-row-element/HTMLTableRowElement.ts +149 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-section-element/HTMLTableSectionElement.ts +88 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-template-element/HTMLTemplateElement.ts +154 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-text-area-element/HTMLTextAreaElement.ts +649 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-time-element/HTMLTimeElement.ts +27 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-title-element/HTMLTitleElement.ts +48 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-track-element/HTMLTrackElement.ts +164 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-u-list-element/HTMLUListElement.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-unknown-element/HTMLUnknownElement.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/html-video-element/HTMLVideoElement.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedComputedStyleResult.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedElementByIdResult.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedElementByTagNameResult.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedElementsByTagNameResult.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedMatchesResult.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedQuerySelectorAllResult.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedQuerySelectorResult.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedResult.ts +3 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedStyleResult.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/Node.ts +1373 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/NodeDocumentPositionEnum.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/NodeList.ts +224 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/NodeTypeEnum.ts +13 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/NodeUtility.ts +330 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/node/TNodeListListener.ts +1 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/parent-node/IParentNode.ts +109 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/parent-node/ParentNodeUtility.ts +334 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/processing-instruction/ProcessingInstruction.ts +22 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/shadow-root/ShadowRoot.ts +290 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-animate-element/SVGAnimateElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-animate-motion-element/SVGAnimateMotionElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-animate-transform-element/SVGAnimateTransformElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-animation-element/SVGAnimationElement.ts +94 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-circle-element/SVGCircleElement.ts +72 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-clip-path-element/SVGClipPathElement.ts +34 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-component-transfer-function-element/SVGComponentTransferFunctionElement.ts +167 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-defs-element/SVGDefsElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-desc-element/SVGDescElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-element/SVGElement.ts +828 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-ellipse-element/SVGEllipseElement.ts +92 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-blend-element/SVGFEBlendElement.ts +192 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-color-matrix-element/SVGFEColorMatrixElement.ts +204 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-component-transfer-element/SVGFEComponentTransferElement.ts +133 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-composite-element/SVGFECompositeElement.ts +186 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-convolve-matrix-element/SVGFEConvolveMatrixElement.ts +366 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-diffuse-lighting-element/SVGFEDiffuseLightingElement.ts +214 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-displacement-map-element/SVGFEDisplacementMapElement.ts +226 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-distant-light-element/SVGFEDistantLightElement.ts +52 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-drop-shadow-element/SVGFEDropShadowElement.ts +227 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-flood-element/SVGFEFloodElement.ts +113 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-func-a-element/SVGFEFuncAElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-func-b-element/SVGFEFuncBElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-func-g-element/SVGFEFuncGElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-func-r-element/SVGFEFuncRElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-gaussian-blur-element/SVGFEGaussianBlurElement.ts +214 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-image-element/SVGFEImageElement.ts +173 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-merge-element/SVGFEMergeElement.ts +113 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-merge-node-element/SVGFEMergeNodeElement.ts +32 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-morphology-element/SVGFEMorphologyElement.ts +202 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-offset-element/SVGFEOffsetElement.ts +174 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-point-light-element/SVGFEPointLightElement.ts +72 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-specular-lighting-element/SVGFESpecularLightingElement.ts +237 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-spot-light-element/SVGFESpotLightElement.ts +173 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-tile-element/SVGFETileElement.ts +133 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-turbulence-element/SVGFETurbulenceElement.ts +249 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-filter-element/SVGFilterElement.ts +158 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-foreign-object-element/SVGForeignObjectElement.ts +92 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-g-element/SVGGElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-geometry-element/SVGGeometryElement.ts +94 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-gradient-element/SVGGradientElement.ts +104 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-graphics-element/SVGGraphicsElement.ts +134 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-image-element/SVGImageElement.ts +188 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-line-element/SVGLineElement.ts +92 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-linear-gradient-element/SVGLinearGradientElement.ts +92 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-m-path-element/SVGMPathElement.ts +32 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-marker-element/SVGMarkerElement.ts +230 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-mask-element/SVGMaskElement.ts +137 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-metadata-element/SVGMetadataElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-path-element/SVGPathElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-pattern-element/SVGPatternElement.ts +179 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-polygon-element/SVGPolygonElement.ts +53 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-polyline-element/SVGPolylineElement.ts +53 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-radial-gradient-element/SVGRadialGradientElement.ts +112 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-rect-element/SVGRectElement.ts +132 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-script-element/SVGScriptElement.ts +50 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-set-element/SVGSetElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-stop-element/SVGStopElement.ts +32 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-style-element/SVGStyleElement.ts +143 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-svg-element/SVGSVGElement.ts +601 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-switch-element/SVGSwitchElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-symbol-element/SVGSymbolElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-t-span-element/SVGTSpanElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-text-content-element/SVGTextContentElement.ts +143 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-text-element/SVGTextElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-text-path-element/SVGTextPathElement.ts +106 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-text-positioning-element/SVGTextPositioningElement.ts +113 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-title-element/SVGTitleElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-use-element/SVGUseElement.ts +113 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-view-element/SVGViewElement.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/text/Text.ts +154 -0
- package/vendor/happy-dom/packages/happy-dom/src/nodes/xml-document/XMLDocument.ts +10 -0
- package/vendor/happy-dom/packages/happy-dom/src/permissions/PermissionNameEnum.ts +32 -0
- package/vendor/happy-dom/packages/happy-dom/src/permissions/PermissionStatus.ts +23 -0
- package/vendor/happy-dom/packages/happy-dom/src/permissions/Permissions.ts +59 -0
- package/vendor/happy-dom/packages/happy-dom/src/query-selector/ISelectorAttribute.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/query-selector/ISelectorMatch.ts +3 -0
- package/vendor/happy-dom/packages/happy-dom/src/query-selector/ISelectorPseudo.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/query-selector/QuerySelector.ts +849 -0
- package/vendor/happy-dom/packages/happy-dom/src/query-selector/SelectorCombinatorEnum.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/query-selector/SelectorItem.ts +575 -0
- package/vendor/happy-dom/packages/happy-dom/src/query-selector/SelectorParser.ts +699 -0
- package/vendor/happy-dom/packages/happy-dom/src/query-selector/TGlobalMatchFunction.ts +12 -0
- package/vendor/happy-dom/packages/happy-dom/src/range/IRangeBoundaryPoint.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/range/Range.ts +1161 -0
- package/vendor/happy-dom/packages/happy-dom/src/range/RangeHowEnum.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/range/RangeUtility.ts +118 -0
- package/vendor/happy-dom/packages/happy-dom/src/resize-observer/ResizeObserver.ts +33 -0
- package/vendor/happy-dom/packages/happy-dom/src/screen/Screen.ts +19 -0
- package/vendor/happy-dom/packages/happy-dom/src/screen/ScreenDetailed.ts +17 -0
- package/vendor/happy-dom/packages/happy-dom/src/screen/ScreenDetails.ts +27 -0
- package/vendor/happy-dom/packages/happy-dom/src/selection/Selection.ts +556 -0
- package/vendor/happy-dom/packages/happy-dom/src/selection/SelectionDirectionEnum.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/storage/Storage.ts +149 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAngle.ts +310 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAngleTypeEnum.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedAngle.ts +100 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedBoolean.ts +80 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedEnumeration.ts +119 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedInteger.ts +97 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedLength.ts +100 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedLengthList.ts +101 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedNumber.ts +101 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedNumberList.ts +101 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedPreserveAspectRatio.ts +100 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedRect.ts +100 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedString.ts +83 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedTransformList.ts +101 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGLength.ts +375 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGLengthList.ts +489 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGLengthTypeEnum.ts +15 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGMatrix.ts +429 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGNumber.ts +83 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGNumberList.ts +522 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPoint.ts +114 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPointList.ts +526 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPreserveAspectRatio.ts +176 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPreserveAspectRatioAlignEnum.ts +15 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPreserveAspectRatioMeetOrSliceEnum.ts +7 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGRect.ts +200 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGStringList.ts +422 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGTransform.ts +369 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGTransformList.ts +531 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGTransformTypeEnum.ts +11 -0
- package/vendor/happy-dom/packages/happy-dom/src/svg/SVGUnitTypes.ts +26 -0
- package/vendor/happy-dom/packages/happy-dom/src/tree-walker/NodeFilter.ts +18 -0
- package/vendor/happy-dom/packages/happy-dom/src/tree-walker/NodeFilterMask.ts +28 -0
- package/vendor/happy-dom/packages/happy-dom/src/tree-walker/NodeIterator.ts +85 -0
- package/vendor/happy-dom/packages/happy-dom/src/tree-walker/TNodeFilter.ts +3 -0
- package/vendor/happy-dom/packages/happy-dom/src/tree-walker/TreeWalker.ts +339 -0
- package/vendor/happy-dom/packages/happy-dom/src/url/URL.ts +45 -0
- package/vendor/happy-dom/packages/happy-dom/src/utilities/AttributeUtility.ts +43 -0
- package/vendor/happy-dom/packages/happy-dom/src/utilities/ClassMethodBinder.ts +71 -0
- package/vendor/happy-dom/packages/happy-dom/src/utilities/StringUtility.ts +47 -0
- package/vendor/happy-dom/packages/happy-dom/src/utilities/XMLEncodeUtility.ts +166 -0
- package/vendor/happy-dom/packages/happy-dom/src/validity-state/ValidityState.ts +234 -0
- package/vendor/happy-dom/packages/happy-dom/src/version.ts +1 -0
- package/vendor/happy-dom/packages/happy-dom/src/web-socket/WebSocket.ts +408 -0
- package/vendor/happy-dom/packages/happy-dom/src/web-socket/WebSocketReadyStateEnum.ts +8 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/BrowserWindow.ts +3074 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/CrossOriginBrowserWindow.ts +152 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/DetachedWindowAPI.ts +133 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/GlobalWindow.ts +90 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/INodeJSGlobal.ts +76 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/IOptionalTimerLoopsLimit.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/IScrollToOptions.ts +5 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/ITimerLoopsLimit.ts +4 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/VMGlobalPropertyScript.ts +59 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/Window.ts +67 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/WindowBrowserContext.ts +117 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/WindowContextClassExtender.ts +288 -0
- package/vendor/happy-dom/packages/happy-dom/src/window/WindowPageOpenUtility.ts +200 -0
- package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequest.ts +577 -0
- package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequestEventTarget.ts +88 -0
- package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequestReadyStateEnum.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequestResponseDataParser.ts +70 -0
- package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequestUpload.ts +6 -0
- package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpResponseTypeEnum.ts +9 -0
- package/vendor/happy-dom/packages/happy-dom/src/xml-parser/XMLParser.ts +744 -0
- package/vendor/happy-dom/packages/happy-dom/src/xml-serializer/XMLSerializer.ts +280 -0
- package/vendor/happy-dom/turbo.json +52 -0
- package/vendor/ses/LICENSE +201 -0
- package/vendor/ses/LICENSE-aura +16 -0
- package/vendor/ses/LICENSE-caja +13 -0
- package/vendor/ses/LICENSE-corejs +19 -0
- package/vendor/ses/LICENSE-v8 +9 -0
- package/vendor/ses/README.md +968 -0
- package/vendor/ses/dist/ses.mjs +15219 -0
- package/vendor/ses/package.json +142 -0
- package/vendor/wasmpeg/LICENSE +501 -0
- package/vendor/wasmpeg/NOTICE +30 -0
- package/vendor/wasmpeg/VENDORING.md +35 -0
- package/vendor/wasmpeg/dist/cpu.js +2 -0
- package/vendor/wasmpeg/dist/cpu.wasm +0 -0
- package/vendor/wasmpeg/package.json +45 -0
- package/vendor/wasmpeg/source-v1.0.1.tar.gz +0 -0
- package/vendor/wasmpeg/src/js/exec.mjs +478 -0
- package/vendor/wasmpeg/src/js/ffmpeg.js +94 -0
- package/vendor/wasmpeg/src/js/formats.js +84 -0
- package/vendor/wasmpeg/src/js/gpu.js +480 -0
- package/vendor/wasmpeg/src/js/index.d.ts +154 -0
- package/vendor/wasmpeg/src/js/index.js +7 -0
- package/vendor/wasmpeg/src/js/wasmpeg.mjs +221 -0
package/PORTING.md
ADDED
|
@@ -0,0 +1,825 @@
|
|
|
1
|
+
# Porting Blink concepts to a Bun/JavaScript browser engine
|
|
2
|
+
|
|
3
|
+
## 1. Goal and constraints
|
|
4
|
+
|
|
5
|
+
This document evaluates building a new browser engine in JavaScript/TypeScript on
|
|
6
|
+
top of Bun. It is not a plan to mechanically translate Blink's C++ files.
|
|
7
|
+
|
|
8
|
+
The intended architecture has these constraints:
|
|
9
|
+
|
|
10
|
+
- Browser engine code is JavaScript or TypeScript executed by Bun.
|
|
11
|
+
- Page JavaScript is executed by Bun/JavaScriptCore. Controlled documents may
|
|
12
|
+
use an in-process realm; arbitrary remote documents use a dedicated Bun
|
|
13
|
+
renderer subprocess.
|
|
14
|
+
- Rendering uses CanvasKit WebAssembly and its Canvas 2D-compatible API.
|
|
15
|
+
- Bun's built-in networking, streams, workers, IPC, image, storage, and runtime
|
|
16
|
+
facilities should be reused instead of reimplemented.
|
|
17
|
+
- A JavaScript realm is not a security sandbox. Bun 1.4.3 exposes `process` and
|
|
18
|
+
`Bun` inside `ShadowRealm`, and `node:vm` has constructor escapes. Process
|
|
19
|
+
separation is therefore required for untrusted pages; until an OS/platform
|
|
20
|
+
sandbox is present, remote script execution must be disabled or explicitly
|
|
21
|
+
marked unsafe.
|
|
22
|
+
- Native addons are not part of the browser implementation. Existing Bun
|
|
23
|
+
internals and CanvasKit WASM are platform dependencies, not code maintained by
|
|
24
|
+
the browser project.
|
|
25
|
+
|
|
26
|
+
The practical goal is therefore:
|
|
27
|
+
|
|
28
|
+
> Implement Web-platform behavior, DOM, style, layout, and browser scheduling
|
|
29
|
+
> in JS/TS while delegating runtime, I/O, codecs, and rasterization to Bun and
|
|
30
|
+
> CanvasKit.
|
|
31
|
+
|
|
32
|
+
## 2. Investigation baseline
|
|
33
|
+
|
|
34
|
+
The observations below were verified locally rather than inferred from public
|
|
35
|
+
documentation.
|
|
36
|
+
|
|
37
|
+
### Chromium checkout
|
|
38
|
+
|
|
39
|
+
- Chromium commit: `2e7327eeeab051c4837bc03a17cbeae763449bcd`
|
|
40
|
+
- Blink implementation directory: `third_party/blink/renderer`
|
|
41
|
+
- Blink renderer physical lines: approximately 3.52 million
|
|
42
|
+
- Renderer source-language lines: approximately 3.47 million
|
|
43
|
+
- C++ accounts for approximately 3.36 million lines, or 96.8% of renderer
|
|
44
|
+
source code.
|
|
45
|
+
|
|
46
|
+
Those numbers describe Blink's current implementation, not the amount of code a
|
|
47
|
+
new engine must reproduce. Blink contains V8 bindings, Oilpan integration,
|
|
48
|
+
Chromium embedder interfaces, platform abstractions, and mature Web API modules
|
|
49
|
+
that do not transfer to this architecture.
|
|
50
|
+
|
|
51
|
+
### Bun binary
|
|
52
|
+
|
|
53
|
+
Verified binary:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
/usr/bin/bun
|
|
57
|
+
Bun 1.4.3
|
|
58
|
+
revision 97246d044e1e6e7c570ed911bb6911ec068759e5
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Relevant Bun source checkout:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
../bun
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### CanvasKit demo
|
|
68
|
+
|
|
69
|
+
Relevant working demo:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
../score-simplify
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The CanvasKit tests were run with:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
cd ../score-simplify
|
|
79
|
+
bun run tri
|
|
80
|
+
bun run test:canvas
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
All 16 Canvas 2D tests passed.
|
|
84
|
+
|
|
85
|
+
## 3. Capabilities verified in Bun 1.4.3
|
|
86
|
+
|
|
87
|
+
### 3.1 JavaScript runtime and realms
|
|
88
|
+
|
|
89
|
+
Bun provides JavaScriptCore, garbage collection, promises, microtasks, timers,
|
|
90
|
+
WebAssembly, modules, and the base event loop. DOM objects implemented as JS
|
|
91
|
+
objects can live in the same garbage-collected heap as page JavaScript. This
|
|
92
|
+
eliminates Blink's V8 wrapper layer and Oilpan-to-JavaScript heap bridge.
|
|
93
|
+
|
|
94
|
+
`node:vm` was tested successfully with:
|
|
95
|
+
|
|
96
|
+
- `vm.createContext()`
|
|
97
|
+
- a separate global object
|
|
98
|
+
- `microtaskMode: "afterEvaluate"`
|
|
99
|
+
- `vm.Script`
|
|
100
|
+
- execution timeouts
|
|
101
|
+
- `vm.SourceTextModule`
|
|
102
|
+
- module `link()` and `evaluate()`
|
|
103
|
+
- module evaluation timeouts
|
|
104
|
+
|
|
105
|
+
Minimal verified pattern:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import vm from "node:vm";
|
|
109
|
+
|
|
110
|
+
const context = vm.createContext({}, {
|
|
111
|
+
microtaskMode: "afterEvaluate",
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const module = new vm.SourceTextModule("export default 6 * 7", {
|
|
115
|
+
context,
|
|
116
|
+
identifier: "https://example.test/a.js",
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
await module.link(() => {});
|
|
120
|
+
await module.evaluate({ timeout: 100 });
|
|
121
|
+
|
|
122
|
+
console.assert(module.namespace.default === 42);
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This is sufficient as the execution foundation for classic scripts and module
|
|
126
|
+
scripts. The browser still needs to implement URL-based module fetching, import
|
|
127
|
+
maps, the module map, MIME/CORS policy if desired, and installation of the
|
|
128
|
+
Window-facing globals in each realm.
|
|
129
|
+
|
|
130
|
+
### 3.2 Event loop foundation
|
|
131
|
+
|
|
132
|
+
Bun already implements:
|
|
133
|
+
|
|
134
|
+
- OS I/O polling
|
|
135
|
+
- task and concurrent-task queues
|
|
136
|
+
- timers and immediates
|
|
137
|
+
- JavaScriptCore's microtask queue
|
|
138
|
+
- `queueMicrotask`
|
|
139
|
+
- Promise rejection handling
|
|
140
|
+
- deferred work queues
|
|
141
|
+
- worker-to-main-thread task dispatch
|
|
142
|
+
|
|
143
|
+
The browser does not need another OS event loop. It needs a browser scheduler on
|
|
144
|
+
top of Bun's loop to impose Web-observable ordering:
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
task
|
|
148
|
+
-> page callback
|
|
149
|
+
-> microtask checkpoint
|
|
150
|
+
-> mutation observer delivery
|
|
151
|
+
-> rendering opportunity
|
|
152
|
+
-> style/layout flush
|
|
153
|
+
-> resize observer delivery
|
|
154
|
+
-> requestAnimationFrame
|
|
155
|
+
-> paint
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The distinction matters: Bun solves polling and execution; the browser must
|
|
159
|
+
still define when rendering work and Web callbacks occur.
|
|
160
|
+
|
|
161
|
+
### 3.3 Existing Web-facing primitives
|
|
162
|
+
|
|
163
|
+
The following globals were verified in the installed Bun binary:
|
|
164
|
+
|
|
165
|
+
- `AbortController`, `AbortSignal`
|
|
166
|
+
- `Blob`, `File`, `FormData`
|
|
167
|
+
- `Event`, `CustomEvent`, `EventTarget`
|
|
168
|
+
- `MessageEvent`, `MessageChannel`, `MessagePort`
|
|
169
|
+
- `BroadcastChannel`
|
|
170
|
+
- `DOMException`
|
|
171
|
+
- `Headers`, `Request`, `Response`, `fetch`
|
|
172
|
+
- `URL`, `URLPattern`, `URLSearchParams`
|
|
173
|
+
- `ReadableStream`, `WritableStream`, `TransformStream`
|
|
174
|
+
- compression/decompression streams
|
|
175
|
+
- `TextEncoder`, `TextDecoder` and stream variants
|
|
176
|
+
- `WebSocket`
|
|
177
|
+
- `Worker`
|
|
178
|
+
- `structuredClone`
|
|
179
|
+
- `Crypto`, `CryptoKey`, `SubtleCrypto`
|
|
180
|
+
- `Performance` and performance entry/observer classes
|
|
181
|
+
- `ShadowRealm`
|
|
182
|
+
- `WebAssembly`
|
|
183
|
+
|
|
184
|
+
These objects can be installed into a page realm or wrapped where browser
|
|
185
|
+
semantics differ. They reduce platform work, but they do not create a DOM or a
|
|
186
|
+
browser lifecycle by themselves.
|
|
187
|
+
|
|
188
|
+
### 3.4 Networking, process, and storage infrastructure
|
|
189
|
+
|
|
190
|
+
Bun also provides:
|
|
191
|
+
|
|
192
|
+
- HTTP through `fetch`
|
|
193
|
+
- TCP, UDP, TLS, DNS, and WebSocket implementations
|
|
194
|
+
- streams and incremental bodies
|
|
195
|
+
- gzip, deflate, Brotli-related HTTP support, and zstd utilities
|
|
196
|
+
- Bun-to-Bun subprocess IPC
|
|
197
|
+
- workers and structured-clone messaging
|
|
198
|
+
- SQLite and SQL APIs
|
|
199
|
+
- filesystem and memory mapping
|
|
200
|
+
- `Cookie` and `CookieMap` parsing primitives
|
|
201
|
+
- bundling, transpilation, module resolution, and single-executable packaging
|
|
202
|
+
|
|
203
|
+
For controlled content, a first implementation can run the browser controller,
|
|
204
|
+
page realm, DOM, style, layout, and renderer in one process. Arbitrary remote
|
|
205
|
+
content must instead use a Bun subprocess with a minimal environment, controlled
|
|
206
|
+
working directory, typed IPC, deadlines, and kill/restart handling. That process
|
|
207
|
+
boundary improves containment but is not a complete security sandbox by itself.
|
|
208
|
+
|
|
209
|
+
### 3.5 XML
|
|
210
|
+
|
|
211
|
+
`Bun.XML` is present in Bun 1.4.3 and was verified with:
|
|
212
|
+
|
|
213
|
+
```ts
|
|
214
|
+
Bun.XML.parse(input, { compact: false });
|
|
215
|
+
Bun.XML.stringify(value);
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
It supplies a conforming XML tree/data parser and serializer. It is useful for:
|
|
219
|
+
|
|
220
|
+
- XML-mode `DOMParser`
|
|
221
|
+
- XHTML
|
|
222
|
+
- SVG/XML documents
|
|
223
|
+
- XML responses
|
|
224
|
+
- XML serialization support
|
|
225
|
+
|
|
226
|
+
It is not an HTML parser. Normal HTML requires error recovery and WHATWG HTML
|
|
227
|
+
tree-construction behavior, whereas `Bun.XML` correctly requires well-formed
|
|
228
|
+
XML.
|
|
229
|
+
|
|
230
|
+
### 3.6 Images
|
|
231
|
+
|
|
232
|
+
`Bun.Image` is implemented as an off-main-thread image pipeline. The source
|
|
233
|
+
checkout shows support for decode, RGBA8 processing, transforms, and encode,
|
|
234
|
+
including the relevant JPEG, PNG, WebP, and platform image paths.
|
|
235
|
+
|
|
236
|
+
The browser can reuse it for image fetching and conversion. Remaining browser
|
|
237
|
+
work includes:
|
|
238
|
+
|
|
239
|
+
- `<img>` request and lifecycle state
|
|
240
|
+
- intrinsic dimensions
|
|
241
|
+
- `load` and `error` events
|
|
242
|
+
- CSS sizing and `object-fit`
|
|
243
|
+
- animated-frame scheduling
|
|
244
|
+
- decoded-image caching
|
|
245
|
+
- passing decoded data to CanvasKit
|
|
246
|
+
|
|
247
|
+
Reimplementing image codecs is unnecessary.
|
|
248
|
+
|
|
249
|
+
## 4. CanvasKit boundary verified in Bun
|
|
250
|
+
|
|
251
|
+
CanvasKit 0.41.1 in `../score-simplify` was initialized directly from WASM
|
|
252
|
+
bytes in Bun. It does not require Bun to expose `HTMLCanvasElement`,
|
|
253
|
+
`OffscreenCanvas`, or WebGL for the tested CPU path:
|
|
254
|
+
|
|
255
|
+
```ts
|
|
256
|
+
const CanvasKit = await CanvasKitInit({ wasmBinary });
|
|
257
|
+
const canvas = CanvasKit.MakeCanvas(width, height);
|
|
258
|
+
const context = canvas.getContext("2d");
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
The following operations passed locally:
|
|
262
|
+
|
|
263
|
+
- rectangle fill, clear, and stroke
|
|
264
|
+
- paths, line segments, close/fill/stroke
|
|
265
|
+
- arcs
|
|
266
|
+
- quadratic and cubic curves
|
|
267
|
+
- linear and radial gradients
|
|
268
|
+
- alpha and composite operations
|
|
269
|
+
- clipping
|
|
270
|
+
- translate/rotate transforms
|
|
271
|
+
- save/restore state
|
|
272
|
+
- image-data creation, write, and readback
|
|
273
|
+
- PNG decoding and `drawImage`
|
|
274
|
+
- line dashes
|
|
275
|
+
- font loading
|
|
276
|
+
- `fillText` and `measureText`
|
|
277
|
+
- PNG/data-URL output
|
|
278
|
+
- direct RGBA pixel access
|
|
279
|
+
|
|
280
|
+
The demo also verifies a useful division of labor:
|
|
281
|
+
|
|
282
|
+
- CanvasKit performs drawing, decode, and pixel access.
|
|
283
|
+
- `Bun.Image` can perform encoding when the selected CanvasKit build lacks a
|
|
284
|
+
requested encoder.
|
|
285
|
+
- WASM can be bundled as a file asset and supplied as bytes for a Bun
|
|
286
|
+
single-executable build.
|
|
287
|
+
|
|
288
|
+
CanvasKit therefore removes the need to implement rasterization, path geometry,
|
|
289
|
+
anti-aliasing, basic compositing, gradients, image drawing, and basic Canvas 2D
|
|
290
|
+
text drawing.
|
|
291
|
+
|
|
292
|
+
CanvasKit does not implement CSS layout, paint order, stacking contexts,
|
|
293
|
+
scrolling, hit testing, DOM selection, or browser scheduling.
|
|
294
|
+
|
|
295
|
+
## 5. HTML capabilities and limits
|
|
296
|
+
|
|
297
|
+
### 5.1 `HTMLRewriter` and Bun's HTML scanner
|
|
298
|
+
|
|
299
|
+
Bun's `HTMLRewriter` is based on `lol-html`. Bun's bundler reuses the same
|
|
300
|
+
streaming machinery for its HTML scanner. The source scanner already identifies
|
|
301
|
+
scripts, stylesheets, fonts, images, media, workers, manifests, and related URL
|
|
302
|
+
attributes.
|
|
303
|
+
|
|
304
|
+
This is directly useful for:
|
|
305
|
+
|
|
306
|
+
- resource preloading and discovery
|
|
307
|
+
- streaming inspection
|
|
308
|
+
- URL rewriting
|
|
309
|
+
- static-page prototypes
|
|
310
|
+
- serialization/transformation
|
|
311
|
+
- a preliminary resource scanner independent of the DOM builder
|
|
312
|
+
|
|
313
|
+
It is not a complete browser DOM parser. Its public abstraction is a streaming
|
|
314
|
+
rewriter with transient handlers rather than a persistent, script-reentrant
|
|
315
|
+
HTML tree builder.
|
|
316
|
+
|
|
317
|
+
The browser still needs, directly or through a reusable JS implementation:
|
|
318
|
+
|
|
319
|
+
- the HTML tokenizer/tree builder contract
|
|
320
|
+
- insertion modes
|
|
321
|
+
- active formatting elements
|
|
322
|
+
- adoption-agency recovery
|
|
323
|
+
- foster parenting
|
|
324
|
+
- template contents
|
|
325
|
+
- SVG/MathML namespace transitions
|
|
326
|
+
- parser pause/resume for scripts
|
|
327
|
+
- parser-inserted scripts
|
|
328
|
+
- `document.write()` input insertion
|
|
329
|
+
- DOM construction and mutation hooks
|
|
330
|
+
|
|
331
|
+
For an early static renderer, `HTMLRewriter` can help build an approximate tree.
|
|
332
|
+
For broad compatibility, use or implement a WHATWG-compatible tree builder and
|
|
333
|
+
retain `HTMLRewriter` as the preload scanner.
|
|
334
|
+
|
|
335
|
+
### 5.2 `Bun.XML`
|
|
336
|
+
|
|
337
|
+
`Bun.XML` should back strict XML modes and can reduce XML/SVG-document work. It
|
|
338
|
+
must not be used to parse `text/html`.
|
|
339
|
+
|
|
340
|
+
## 6. Bun's CSS parser
|
|
341
|
+
|
|
342
|
+
### 6.1 What exists internally
|
|
343
|
+
|
|
344
|
+
`../bun/src/css` contains Bun's CSS parser, derived from Lightning CSS and
|
|
345
|
+
Servo. Source inspection shows support for stylesheets, selectors,
|
|
346
|
+
declarations, known properties, media queries, supports conditions, nesting,
|
|
347
|
+
layers, keyframes, font rules, custom properties, calc, color, gradients,
|
|
348
|
+
transforms, flex/grid-related properties, minification, and serialization.
|
|
349
|
+
|
|
350
|
+
This is valuable parsing technology, but it is currently primarily part of the
|
|
351
|
+
bundler.
|
|
352
|
+
|
|
353
|
+
### 6.2 Public API status
|
|
354
|
+
|
|
355
|
+
The following were verified as absent in Bun 1.4.3:
|
|
356
|
+
|
|
357
|
+
```ts
|
|
358
|
+
typeof Bun.CSS; // "undefined"
|
|
359
|
+
typeof Bun.css; // "undefined"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
There is no public runtime API returning a stylesheet, selector, declaration,
|
|
363
|
+
or typed property AST.
|
|
364
|
+
|
|
365
|
+
### 6.3 Private testing interface
|
|
366
|
+
|
|
367
|
+
Bun contains a private CSS interface in `bun:internal-for-testing`. Release
|
|
368
|
+
builds require `--expose-internals`:
|
|
369
|
+
|
|
370
|
+
```sh
|
|
371
|
+
bun --expose-internals app.ts
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Verified usage:
|
|
375
|
+
|
|
376
|
+
```ts
|
|
377
|
+
import { cssInternals } from "bun:internal-for-testing";
|
|
378
|
+
|
|
379
|
+
cssInternals.minifyTest(
|
|
380
|
+
".a { color: red; display: flex }",
|
|
381
|
+
"",
|
|
382
|
+
);
|
|
383
|
+
// ".a{color:red;display:flex}"
|
|
384
|
+
|
|
385
|
+
cssInternals.attrTest(
|
|
386
|
+
"color:red;display:flex",
|
|
387
|
+
"",
|
|
388
|
+
false,
|
|
389
|
+
);
|
|
390
|
+
// "color: red; display: flex"
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
The exposed private operations parse, validate, normalize, prefix, minify, and
|
|
394
|
+
serialize CSS. They return CSS text, not a structured runtime AST.
|
|
395
|
+
|
|
396
|
+
They can help with prototypes and canonicalization, but cannot directly drive:
|
|
397
|
+
|
|
398
|
+
- selector matching
|
|
399
|
+
- cascade
|
|
400
|
+
- inheritance
|
|
401
|
+
- computed values
|
|
402
|
+
- property dependency tracking
|
|
403
|
+
- style invalidation
|
|
404
|
+
- layout
|
|
405
|
+
|
|
406
|
+
Private testing APIs are also not a stable production contract.
|
|
407
|
+
|
|
408
|
+
### 6.4 Why `dlsym`/Bun FFI does not currently expose the parser
|
|
409
|
+
|
|
410
|
+
The installed `/usr/bin/bun` was inspected with `readelf -Ws` and `nm -D`.
|
|
411
|
+
There is no dynamically exported CSS parsing entry point such as
|
|
412
|
+
`Bun__CSS__parse` or `css_parse`.
|
|
413
|
+
|
|
414
|
+
`bun:ffi` is capable of calling C ABI functions found through dynamic symbols,
|
|
415
|
+
but Bun's internal stylesheet parser has neither the required exported symbol
|
|
416
|
+
nor a suitable ABI. Its Rust API uses generic internal types, a bump arena,
|
|
417
|
+
borrowed AST data, import records, and internal diagnostics. Calling a mangled
|
|
418
|
+
Rust symbol by an address would be version-specific and unsafe even if its
|
|
419
|
+
address were found.
|
|
420
|
+
|
|
421
|
+
The private CSS functions do not use `dlsym`; Bun connects them through its
|
|
422
|
+
generated JavaScript-to-Rust dispatch mechanism.
|
|
423
|
+
|
|
424
|
+
### 6.5 CSS integration options
|
|
425
|
+
|
|
426
|
+
Ordered from least invasive to most integrated:
|
|
427
|
+
|
|
428
|
+
1. Use a pure JS CSS parser and keep the entire style AST in the JS heap.
|
|
429
|
+
2. Use a CSS parser compiled to WASM with a compact typed-array result.
|
|
430
|
+
3. Use private `cssInternals` to normalize CSS, then parse the canonical output
|
|
431
|
+
in JS. This parses twice but can simplify a prototype.
|
|
432
|
+
4. Add an upstream-quality `Bun.CSS.parse()` API to Bun.
|
|
433
|
+
|
|
434
|
+
The ideal Bun API should not eagerly allocate a deeply nested JS object for
|
|
435
|
+
every token. Better possible shapes are:
|
|
436
|
+
|
|
437
|
+
- callbacks for rules/selectors/declarations; or
|
|
438
|
+
- a compact bytecode/typed-array IR plus a string table.
|
|
439
|
+
|
|
440
|
+
For example:
|
|
441
|
+
|
|
442
|
+
```ts
|
|
443
|
+
const result = Bun.CSS.parseToBuffer(source);
|
|
444
|
+
|
|
445
|
+
// Conceptual result
|
|
446
|
+
result.bytecode; // Uint32Array
|
|
447
|
+
result.strings; // string[]
|
|
448
|
+
result.imports; // string[]
|
|
449
|
+
result.errors; // diagnostics
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
Exposing Bun's parser would remove CSS tokenization, grammar, property parsing,
|
|
453
|
+
selector parsing, and error-recovery work. It would not implement selector
|
|
454
|
+
matching, cascade, computed style, invalidation, or layout.
|
|
455
|
+
|
|
456
|
+
## 7. Components that still have to be built
|
|
457
|
+
|
|
458
|
+
### 7.1 DOM object model
|
|
459
|
+
|
|
460
|
+
Bun does not provide browser `Node`, `Document`, `Element`, `HTMLElement`,
|
|
461
|
+
`Text`, `Comment`, `DocumentFragment`, collections, ranges, selection, Shadow
|
|
462
|
+
DOM, or custom elements.
|
|
463
|
+
|
|
464
|
+
Required work includes:
|
|
465
|
+
|
|
466
|
+
- ownership and parent/child/sibling traversal
|
|
467
|
+
- attributes and namespaces
|
|
468
|
+
- document order
|
|
469
|
+
- insertion/removal/adoption/cloning
|
|
470
|
+
- connected-state changes
|
|
471
|
+
- text and HTML serialization
|
|
472
|
+
- live collections where required
|
|
473
|
+
- selector-query integration
|
|
474
|
+
- mutation records and observers
|
|
475
|
+
- event propagation paths and default actions
|
|
476
|
+
- realm-correct constructors and prototypes
|
|
477
|
+
|
|
478
|
+
This is a good fit for JS because DOM and page values share a garbage-collected
|
|
479
|
+
heap. Care is still required to maintain stable object shapes and avoid
|
|
480
|
+
allocating excessive temporary objects.
|
|
481
|
+
|
|
482
|
+
### 7.2 Web IDL-visible behavior
|
|
483
|
+
|
|
484
|
+
No native binding generator is required, but Web APIs expose observable IDL
|
|
485
|
+
semantics:
|
|
486
|
+
|
|
487
|
+
- argument and return-value conversion
|
|
488
|
+
- overload resolution
|
|
489
|
+
- brand checks
|
|
490
|
+
- illegal constructors
|
|
491
|
+
- prototype and property descriptors
|
|
492
|
+
- `DOMException` behavior
|
|
493
|
+
- callback invocation rules
|
|
494
|
+
- dictionary and union conversion
|
|
495
|
+
- realm ownership
|
|
496
|
+
- named and indexed properties
|
|
497
|
+
|
|
498
|
+
A JS/TS Web IDL generator may eventually be worthwhile. An MVP can implement
|
|
499
|
+
interfaces manually and tighten compatibility over time.
|
|
500
|
+
|
|
501
|
+
### 7.3 Selector matching, cascade, and computed style
|
|
502
|
+
|
|
503
|
+
Even with a complete CSS parser, the browser must implement:
|
|
504
|
+
|
|
505
|
+
```text
|
|
506
|
+
stylesheet rules
|
|
507
|
+
-> selector indexes
|
|
508
|
+
-> matched declarations
|
|
509
|
+
-> origin/layer/specificity/source-order cascade
|
|
510
|
+
-> inheritance and initial values
|
|
511
|
+
-> custom-property substitution
|
|
512
|
+
-> computed values
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
Important subjects include UA styles, inline styles, `!important`, layers,
|
|
516
|
+
media/supports rules, pseudo-classes/elements, `var()`, relative units, and
|
|
517
|
+
dependency tracking.
|
|
518
|
+
|
|
519
|
+
An MVP should initially recalculate all styles after relevant mutations. Style
|
|
520
|
+
invalidation can be added only when profiling shows the need.
|
|
521
|
+
|
|
522
|
+
### 7.4 Layout
|
|
523
|
+
|
|
524
|
+
Layout remains the largest single subsystem. CanvasKit is a renderer, not a CSS
|
|
525
|
+
layout engine.
|
|
526
|
+
|
|
527
|
+
Required areas include:
|
|
528
|
+
|
|
529
|
+
- block formatting and margin collapsing
|
|
530
|
+
- inline formatting and line boxes
|
|
531
|
+
- whitespace and line breaking
|
|
532
|
+
- replaced elements and intrinsic sizing
|
|
533
|
+
- absolute/fixed/sticky positioning
|
|
534
|
+
- percentage, min/max, and intrinsic sizes
|
|
535
|
+
- flexbox
|
|
536
|
+
- grid
|
|
537
|
+
- tables
|
|
538
|
+
- overflow and scrolling
|
|
539
|
+
- writing modes
|
|
540
|
+
- fragmentation, if required
|
|
541
|
+
|
|
542
|
+
Recommended implementation order:
|
|
543
|
+
|
|
544
|
+
1. block layout
|
|
545
|
+
2. inline text layout
|
|
546
|
+
3. replaced elements/images
|
|
547
|
+
4. absolute positioning
|
|
548
|
+
5. flexbox
|
|
549
|
+
6. overflow and scrolling
|
|
550
|
+
7. grid
|
|
551
|
+
8. tables
|
|
552
|
+
9. sticky positioning
|
|
553
|
+
10. advanced writing modes and fragmentation
|
|
554
|
+
|
|
555
|
+
SkParagraph or CanvasKit text measurement can perform shaping and glyph work,
|
|
556
|
+
but CSS inline box construction, whitespace, line-height, decoration, DOM range
|
|
557
|
+
mapping, and line breaking policy remain browser responsibilities.
|
|
558
|
+
|
|
559
|
+
### 7.5 Paint ordering and display lists
|
|
560
|
+
|
|
561
|
+
Layout output must be converted into Web-correct paint order and CanvasKit
|
|
562
|
+
operations. Remaining work includes:
|
|
563
|
+
|
|
564
|
+
- backgrounds and borders
|
|
565
|
+
- stacking contexts and `z-index`
|
|
566
|
+
- clips, transforms, and effects
|
|
567
|
+
- opacity groups
|
|
568
|
+
- shadows, filters, and text decoration
|
|
569
|
+
- scrolling offsets
|
|
570
|
+
- hit-test data
|
|
571
|
+
- dirty regions and retained display items
|
|
572
|
+
|
|
573
|
+
An MVP may repaint the full viewport. The preferred eventual boundary is a
|
|
574
|
+
retained display list rather than direct painting from every DOM node:
|
|
575
|
+
|
|
576
|
+
```text
|
|
577
|
+
DOM/style
|
|
578
|
+
-> layout fragments
|
|
579
|
+
-> paint property trees/display list
|
|
580
|
+
-> CanvasKit replay
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
This reduces JS-to-WASM traffic and allows caching CanvasKit paths, images,
|
|
584
|
+
fonts, and paragraphs.
|
|
585
|
+
|
|
586
|
+
### 7.6 Browser scheduling and forced flushes
|
|
587
|
+
|
|
588
|
+
Bun's event loop must be wrapped with browser-specific queues and rendering
|
|
589
|
+
opportunities. Synchronous DOM reads require forced work:
|
|
590
|
+
|
|
591
|
+
```js
|
|
592
|
+
element.style.width = "100px";
|
|
593
|
+
const width = element.offsetWidth;
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
`offsetWidth` may need to synchronously flush pending style and layout before
|
|
597
|
+
returning.
|
|
598
|
+
|
|
599
|
+
Required scheduling includes parsing, scripts, network completions, timers,
|
|
600
|
+
microtasks, mutation observers, animation frames, resize/intersection observers,
|
|
601
|
+
input, load lifecycle events, and rendering.
|
|
602
|
+
|
|
603
|
+
### 7.7 Window, navigation, and resources
|
|
604
|
+
|
|
605
|
+
The browser must supply:
|
|
606
|
+
|
|
607
|
+
- `window`, `document`, `location`, `history`, `navigator`
|
|
608
|
+
- navigation and document replacement
|
|
609
|
+
- classic and module script loading
|
|
610
|
+
- stylesheet and font loading
|
|
611
|
+
- image lifecycle
|
|
612
|
+
- base URL resolution
|
|
613
|
+
- `DOMContentLoaded` and `load`
|
|
614
|
+
- request caching and deduplication
|
|
615
|
+
- cookies and storage semantics as needed
|
|
616
|
+
- iframe/browsing-context support when introduced
|
|
617
|
+
|
|
618
|
+
For the controlled-content MVP, cross-origin iframes, full `WindowProxy`
|
|
619
|
+
semantics, and origin-process assignment can be deferred. Same-origin and CORS
|
|
620
|
+
behavior is still required for compatibility. Arbitrary remote scripts remain
|
|
621
|
+
disabled or explicitly unsafe until the renderer has a platform security
|
|
622
|
+
sandbox; a Bun subprocess alone does not make origin checks optional.
|
|
623
|
+
|
|
624
|
+
### 7.8 Input, forms, editing, and default actions
|
|
625
|
+
|
|
626
|
+
Bun's `EventTarget` does not implement browser interaction behavior. Remaining
|
|
627
|
+
work includes:
|
|
628
|
+
|
|
629
|
+
- hit testing
|
|
630
|
+
- pointer, mouse, wheel, and keyboard events
|
|
631
|
+
- focus and tab navigation
|
|
632
|
+
- link activation
|
|
633
|
+
- buttons, checkboxes, radio buttons, and form submission
|
|
634
|
+
- text input
|
|
635
|
+
- selection and caret
|
|
636
|
+
- clipboard and IME
|
|
637
|
+
- editable content
|
|
638
|
+
|
|
639
|
+
Basic click/focus/input can be implemented early. Full editing, selection, and
|
|
640
|
+
IME are large later-stage subsystems.
|
|
641
|
+
|
|
642
|
+
### 7.9 Web API long tail
|
|
643
|
+
|
|
644
|
+
Features such as IndexedDB, service workers, Cache API, Web Audio, media,
|
|
645
|
+
WebRTC, accessibility, WebGL/WebGPU DOM facades, permissions, geolocation,
|
|
646
|
+
notifications, SVG DOM, and advanced editing are not prerequisites for the
|
|
647
|
+
first renderer. They should be prioritized based on target sites rather than
|
|
648
|
+
copied wholesale from Blink.
|
|
649
|
+
|
|
650
|
+
## 8. Recommended architecture
|
|
651
|
+
|
|
652
|
+
Keep a document's JS, DOM, style, and layout in the same Bun renderer process
|
|
653
|
+
so synchronous DOM APIs remain cheap. The controller may share that process
|
|
654
|
+
for controlled fixtures, but arbitrary remote pages require a subprocess:
|
|
655
|
+
|
|
656
|
+
```text
|
|
657
|
+
Bun process
|
|
658
|
+
|
|
|
659
|
+
+-- Browser controller
|
|
660
|
+
| +-- tabs and navigation
|
|
661
|
+
| +-- history
|
|
662
|
+
| +-- resource/cache coordinator
|
|
663
|
+
| +-- frame scheduler
|
|
664
|
+
|
|
|
665
|
+
+-- Page realm (Bun/JSC; not a security boundary)
|
|
666
|
+
| +-- Window and Document globals
|
|
667
|
+
| +-- classic scripts
|
|
668
|
+
| +-- SourceTextModule graph
|
|
669
|
+
| +-- Web-facing Bun primitives
|
|
670
|
+
|
|
|
671
|
+
+-- DOM and HTML
|
|
672
|
+
| +-- persistent DOM tree
|
|
673
|
+
| +-- HTML tree builder
|
|
674
|
+
| +-- HTMLRewriter-based preload scanner
|
|
675
|
+
|
|
|
676
|
+
+-- Style engine
|
|
677
|
+
| +-- CSS parser/IR
|
|
678
|
+
| +-- selector matcher
|
|
679
|
+
| +-- cascade and computed styles
|
|
680
|
+
|
|
|
681
|
+
+-- Layout engine
|
|
682
|
+
| +-- block/inline
|
|
683
|
+
| +-- replaced elements
|
|
684
|
+
| +-- flex, then grid/table
|
|
685
|
+
|
|
|
686
|
+
+-- Rendering
|
|
687
|
+
+-- display list and hit-test data
|
|
688
|
+
+-- CanvasKit.MakeCanvas()
|
|
689
|
+
+-- Bun.Image
|
|
690
|
+
+-- frame/PNG/output presentation
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
Do not split page JavaScript from its DOM through RPC. DOM APIs are synchronous
|
|
694
|
+
and fine-grained. If processes are introduced, use one coarse renderer unit per
|
|
695
|
+
tab/document group and send only navigation, resource, input, frame, and
|
|
696
|
+
lifecycle messages across IPC.
|
|
697
|
+
|
|
698
|
+
## 9. Suggested implementation stages
|
|
699
|
+
|
|
700
|
+
### Stage 0: vertical feasibility slice and CDP contract
|
|
701
|
+
|
|
702
|
+
Render one document containing text, an image, block boxes, and flex layout:
|
|
703
|
+
|
|
704
|
+
```text
|
|
705
|
+
fetch HTML
|
|
706
|
+
-> build DOM
|
|
707
|
+
-> parse CSS
|
|
708
|
+
-> cascade
|
|
709
|
+
-> block/inline/flex layout
|
|
710
|
+
-> display list
|
|
711
|
+
-> CanvasKit
|
|
712
|
+
-> RGBA/PNG
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
This validates data structures and ownership before implementing broad APIs.
|
|
716
|
+
|
|
717
|
+
In the same stage, `../casty` must be able to discover/create a page target,
|
|
718
|
+
navigate it, set viewport and user agent, and receive a placeholder screenshot
|
|
719
|
+
over CDP. Replace the placeholder with CanvasKit output during Stage 1 and add
|
|
720
|
+
screencast frame events as rendering invalidation becomes available.
|
|
721
|
+
|
|
722
|
+
### Stage 1: static renderer
|
|
723
|
+
|
|
724
|
+
- Document, Element, Text, attributes
|
|
725
|
+
- HTML tree construction
|
|
726
|
+
- stylesheet and inline-style parsing
|
|
727
|
+
- basic selectors and cascade
|
|
728
|
+
- block and inline layout
|
|
729
|
+
- images and fonts
|
|
730
|
+
- backgrounds, borders, and text painting
|
|
731
|
+
- full-frame output
|
|
732
|
+
|
|
733
|
+
### Stage 2: scripts and interaction
|
|
734
|
+
|
|
735
|
+
- Window realm bootstrap
|
|
736
|
+
- classic scripts and modules
|
|
737
|
+
- DOM mutation
|
|
738
|
+
- events and propagation
|
|
739
|
+
- timers, microtasks, and animation frames
|
|
740
|
+
- forced style/layout flushes
|
|
741
|
+
- hit testing, clicking, focus, and scrolling
|
|
742
|
+
|
|
743
|
+
### Stage 3: common modern layouts
|
|
744
|
+
|
|
745
|
+
- flexbox
|
|
746
|
+
- absolute/fixed positioning
|
|
747
|
+
- overflow and scroll containers
|
|
748
|
+
- grid
|
|
749
|
+
- forms and basic text input
|
|
750
|
+
- incremental resource lifecycle
|
|
751
|
+
- style/layout/paint caching based on profiling
|
|
752
|
+
|
|
753
|
+
### Stage 4: compatibility-driven expansion
|
|
754
|
+
|
|
755
|
+
- iframe and navigation model
|
|
756
|
+
- tables
|
|
757
|
+
- custom elements and Shadow DOM
|
|
758
|
+
- observers
|
|
759
|
+
- storage APIs
|
|
760
|
+
- selection/editing
|
|
761
|
+
- additional Web APIs based on actual target sites and WPT failures
|
|
762
|
+
|
|
763
|
+
## 10. Estimated scale
|
|
764
|
+
|
|
765
|
+
These estimates assume Bun 1.4.3, CanvasKit WASM, renderer process isolation
|
|
766
|
+
(with platform sandbox hardening tracked separately), reuse of available
|
|
767
|
+
JS/WASM parsers where appropriate, and deliberate deferral of media, WebRTC,
|
|
768
|
+
complete editing, accessibility, and the full Web API surface.
|
|
769
|
+
|
|
770
|
+
| Target | Estimated engine code | Estimated effort |
|
|
771
|
+
| --- | ---: | ---: |
|
|
772
|
+
| Static HTML/CSS renderer | 80k-150k JS/TS LOC | 0.5-1.5 engineer-years |
|
|
773
|
+
| Interactive JS-capable MVP | 150k-300k JS/TS LOC | 2-5 engineer-years |
|
|
774
|
+
| Useful for selected modern sites | 250k-500k JS/TS LOC | 5-15 engineer-years |
|
|
775
|
+
| Good general-site compatibility | 500k-1M JS/TS LOC | 20-60 engineer-years |
|
|
776
|
+
| Broad Web-platform compatibility | 1M+ JS/TS LOC plus extensive tests | 80-200+ engineer-years |
|
|
777
|
+
|
|
778
|
+
The estimates are dominated by cascade, layout, interaction, and compatibility,
|
|
779
|
+
not by Bun integration or rasterization.
|
|
780
|
+
|
|
781
|
+
## 11. Current risk ranking
|
|
782
|
+
|
|
783
|
+
| Area | Available foundation | Remaining risk |
|
|
784
|
+
| --- | ---: | ---: |
|
|
785
|
+
| JS engine and GC | Complete | Low |
|
|
786
|
+
| Realms and modules | Strong | Low to medium |
|
|
787
|
+
| OS event loop and I/O | Complete | Low |
|
|
788
|
+
| Networking and streams | Strong | Medium browser semantics |
|
|
789
|
+
| Workers and IPC | Strong | Low |
|
|
790
|
+
| Image codecs | Strong | Low |
|
|
791
|
+
| Canvas 2D rasterization | Verified strong | Low to medium |
|
|
792
|
+
| XML | Strong | Low |
|
|
793
|
+
| HTML streaming scan | Strong | Medium tree-builder gap |
|
|
794
|
+
| Persistent DOM | Missing | High |
|
|
795
|
+
| CSS grammar | Strong internally, no public AST | Medium |
|
|
796
|
+
| Selector matching and cascade | Missing | High |
|
|
797
|
+
| Layout | Missing | Very high |
|
|
798
|
+
| Paint order/display lists | Partial primitives only | High |
|
|
799
|
+
| Browser scheduling | Runtime exists, Web policy missing | Medium to high |
|
|
800
|
+
| Navigation/browsing contexts | Mostly missing | High |
|
|
801
|
+
| Forms/editing/IME | Mostly missing | High, deferrable |
|
|
802
|
+
| Web API long tail | Mixed | High, incremental |
|
|
803
|
+
|
|
804
|
+
## 12. Conclusion
|
|
805
|
+
|
|
806
|
+
The local evidence supports the architecture. Bun can host the engine and page
|
|
807
|
+
JavaScript; CanvasKit can provide a headless Canvas 2D raster target directly in
|
|
808
|
+
Bun; Bun already supplies most runtime, networking, streams, IPC, image, XML,
|
|
809
|
+
and storage primitives.
|
|
810
|
+
|
|
811
|
+
The project is therefore not blocked on native bindings, V8 replacement,
|
|
812
|
+
garbage-collector integration, codecs, or basic drawing. The remaining hard
|
|
813
|
+
problems are the actual browser semantics:
|
|
814
|
+
|
|
815
|
+
1. persistent DOM and HTML tree construction;
|
|
816
|
+
2. selector matching, cascade, and computed style;
|
|
817
|
+
3. CSS layout, especially inline formatting, flex, grid, tables, and intrinsic
|
|
818
|
+
sizing;
|
|
819
|
+
4. paint ordering, scrolling, hit testing, and interaction;
|
|
820
|
+
5. browser scheduling, navigation, and compatibility behavior.
|
|
821
|
+
|
|
822
|
+
A useful constrained browser is feasible without reproducing Blink's full 3.5
|
|
823
|
+
million-line implementation. Broad compatibility remains a large, long-term
|
|
824
|
+
engine project, but its difficulty is concentrated in Web behavior rather than
|
|
825
|
+
in Bun or CanvasKit platform integration.
|