Skip to content

Make Document a node for native WPT fixtures - #83

Merged
cowboyd merged 1 commit into
mainfrom
wpt-restructure
Nov 17, 2026
Merged

cowboyd merged 1 commit into
mainfrom
wpt-restructure

Conversation

@cowboyd

@cowboyd cowboyd commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

This is the first rung toward running WPT natively against our DOM: execute unchanged upstream sources with their original document trees and shared setup.

Lots of tests use document.addEventListener(), document.body, etc... and so we need to Make Document inherit from Node, with DOCUMENT_NODE, #document, and a null ownerDocument. Its <html> root becomes a child of the document and contains <body>, so parent relationships use the implementation's own tree.

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

@pkg-pr-new

pkg-pr-new Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/bombshell-dev/ui/@clack/ui@83

commit: ca327e2

@cowboyd
cowboyd added this pull request to stack #88 November 17, 2026 05:00
@cowboyd
cowboyd marked this pull request as ready for review November 17, 2026 05:02

@natemoo-re natemoo-re left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with a non-blocking comment. Would love to address it but also fine to revisit later

Comment thread packages/ui/src/dom.ts Resolved
@cowboyd
cowboyd merged commit f6b3f0b into main Nov 17, 2026
8 of 10 checks passed
@cowboyd
cowboyd deleted the wpt-restructure branch November 17, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants