Skip to content

Add shared DOM lookup and live collections - #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?

Provide the shared DOM lookup layer at the base of the styling stack. The focus stack (#75) also depends on this PR; document fragments from #90 are already on main.

  • Document.getElementById() finds the first matching element in current tree order and reflects ID changes, insertion, removal, and reordering.
  • findElement and findElements reuse the CSS selector adapter for literal predicate traversal.
  • Document.getElementsByTagName() returns live HTMLCollection results with indexed access, iteration, and named lookup.
  • HTMLDivElement is registered once in the document factory and WPT bindings.

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 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 60527fe

@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
@cowboyd
cowboyd marked this pull request as ready for review November 13, 2026 05:39
@cowboyd
cowboyd marked this pull request as draft November 17, 2026 17:45
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch from 2e1197b to b036672 Compare November 17, 2026 18:03
@cowboyd
cowboyd removed this pull request from stack #73 November 17, 2026 18:06
@cowboyd
cowboyd changed the base branch from main to dom-default-view November 17, 2026 18:06
@cowboyd
cowboyd added this pull request to stack #89 November 17, 2026 18:06
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch from b036672 to 1b1342b Compare November 17, 2026 21:35
@cowboyd
cowboyd removed this pull request from stack #89 November 17, 2026 21:35
@cowboyd
cowboyd changed the base branch from dom-default-view to dom-document-fragment November 17, 2026 21:35
@cowboyd
cowboyd added this pull request to stack #91 November 17, 2026 21:35
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch from 1b1342b to a7ba3cd Compare November 17, 2026 21:43
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch from a7ba3cd to cfbadc5 Compare November 17, 2026 22:12
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch 2 times, most recently from 2c71877 to fa76dc1 Compare November 18, 2026 02:50
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch from fa76dc1 to c288b8e Compare November 18, 2026 23:31
@cowboyd
cowboyd marked this pull request as ready for review November 18, 2026 23:36
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch from c288b8e to 0e73e7f Compare November 19, 2026 01:06
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch 2 times, most recently from 28354a8 to 6c77904 Compare November 19, 2026 17:17
@cowboyd
cowboyd removed this pull request from stack #91 November 19, 2026 17:17
@cowboyd cowboyd changed the title Add support classes to DOM required to run CSS Style tests Add shared DOM lookup and live collections Nov 19, 2026
@cowboyd cowboyd mentioned this pull request Nov 19, 2026
3 of 9 tasks
@cowboyd
cowboyd added this pull request to stack #104 November 19, 2026 17:18
Base automatically changed from dom-document-fragment to main November 19, 2026 17:24
cowboyd added a commit that referenced this pull request Nov 19, 2026
## What does this PR do?

Add `Document.createDocumentFragment()`, fragment node identity,
descendant `textContent`, and insertion that transfers children in order
and returns the emptied fragment. Enable the corresponding original Web
Platform Tests.

This starts the shared DOM foundation used by styling (#38) and focus
(#75). The next PR, #70, adds document lookup and live collections on
top of these node primitives. The WPT runner is inherited from `main`.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor (no behavior change)
- [ ] Documentation
- [ ] Performance improvement
- [ ] Tests
- [ ] Chore (dependencies, CI, tooling)

## Checklist

- [x] I have added a changeset

## AI-generated code disclosure

- [x] This PR includes AI-generated code
@cowboyd
cowboyd force-pushed the dom-get-element-by-id branch from 6c77904 to 60527fe Compare November 19, 2026 17:24
@cowboyd
cowboyd removed this pull request from stack #104 November 19, 2026 19:23
@cowboyd
cowboyd added this pull request to stack #107 November 19, 2026 19:23
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