Skip to content

Support namespace-aware element creation - #64

Merged
cowboyd merged 1 commit into
mainfrom
wpt-create-element-ns
Nov 12, 2026
Merged

cowboyd merged 1 commit into
mainfrom
wpt-create-element-ns

Conversation

@cowboyd

@cowboyd cowboyd commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Preact requires document.createElementNS(), so this PR adds it with namespace normalization, qualified-name validation, and namespace-aware element names.

In order for the test to run it needs also the HTMLElement, HTMLSpanElement, and HTMLUnknownElement constructors to ensure that we got the right namespace. This is ok, because we'll eventually need it to support custom elements.

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

@cowboyd
cowboyd force-pushed the wpt-create-element-ns branch from 18ca180 to 337f184 Compare November 11, 2026 20:57
@pkg-pr-new

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

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 9979d05

@cowboyd
cowboyd added this pull request to stack #63 November 11, 2026 20:58
@cowboyd cowboyd mentioned this pull request Nov 12, 2026
6 of 12 tasks
@cowboyd
cowboyd marked this pull request as ready for review November 12, 2026 16:59
@cowboyd
cowboyd force-pushed the wpt-create-element-ns branch from b3c0bf1 to 3245518 Compare November 12, 2026 17:16
Comment thread packages/ui/src/dom.ts Resolved
@cowboyd
cowboyd force-pushed the wpt-create-element-ns branch from 3245518 to 895745f Compare November 12, 2026 21:16
Base automatically changed from wpt-child-node-remove to main November 12, 2026 21:17
@cowboyd
cowboyd force-pushed the wpt-create-element-ns branch from 895745f to 9979d05 Compare November 12, 2026 21:17
@cowboyd
cowboyd merged commit 24a95ca into main Nov 12, 2026
8 of 10 checks passed
@cowboyd
cowboyd deleted the wpt-create-element-ns branch November 12, 2026 21:53
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