Skip to content

Add support classes to DOM required to run CSS Style tests - #70

Open
cowboyd wants to merge 1 commit into
mainfrom
dom-get-element-by-id
Open

cowboyd wants to merge 1 commit into
mainfrom
dom-get-element-by-id

Conversation

@cowboyd

@cowboyd cowboyd commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

There are a lot of methods needed for the WPT to run the CSS tests.

Add Document.getElementById() and the DOM support needed to exercise it with parsed Web Platform Test fixtures. Lookup returns the first matching element in current tree order and reflects ID changes, insertion, removal, and reordering.

This first rung includes:

  • An HTML document root and body, with HTML element classes used by the fixtures.
  • Live getElementsByTagName() results and HTMLCollection indexed properties, iteration, and named lookup.
  • A test-only parse5 loader that copies parsed markup, attributes, namespaces, text, and comments into UI nodes.

Type of change

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

Checklist

  • All tests pass (pnpm test)
  • Files are formatted (pnpm format)
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

AI assisted with implementation, WPT adaptations, validation, and PR splitting.

@pkg-pr-new

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

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 2e1197b

@cowboyd
cowboyd marked this pull request as draft November 13, 2026 03:42
@cowboyd
cowboyd added this pull request to stack #73 November 13, 2026 03:43
@cowboyd cowboyd changed the title Support document ID lookup Add support classes to DOM required to run CSS Style tests Nov 13, 2026
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch from eee4cc2 to 2e1197b Compare November 13, 2026 05:22
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedparse5@​8.1.1931008893100

View full report

@cowboyd
cowboyd marked this pull request as ready for review November 13, 2026 05:39
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.

1 participant