Skip to content

Implement XML document creation for native WPT setup - #85

Merged
cowboyd merged 1 commit into
mainfrom
dom-create-document
Nov 18, 2026
Merged

cowboyd merged 1 commit into
mainfrom
dom-create-document

Conversation

@cowboyd

@cowboyd cowboyd commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

See #87 for the endgame.

We want to run WPT test cases directly without any changes to the upstream and without hosting hundreds approximations of those tests in our repository. Document-createAttribute.html and Node-textContent.html create XML documents during shared setup, before their selected cases run.

Implement DOMImplementation.createDocument(), returning an XMLDocument with an optional namespaced root and doctype. Convert and validate the factory arguments so upstream setup can use the implementation directly.

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@85

commit: 2e85cd8

@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:11
@cowboyd
cowboyd force-pushed the dom-create-document branch 2 times, most recently from 685a077 to 5755563 Compare November 17, 2026 21:59
Base automatically changed from dom-document-type to main November 17, 2026 22:01
@cowboyd
cowboyd force-pushed the dom-create-document branch from 5755563 to 2e85cd8 Compare November 17, 2026 22:01
@cowboyd
cowboyd requested a review from natemoo-re November 17, 2026 22:03
Comment thread packages/ui/src/dom.ts Resolved
Comment thread packages/ui/src/dom.ts

/** XML */

export class XMLDocument extends Document {}

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.

lmao as much as i love html, i hate html

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Worse is better 😆

@cowboyd
cowboyd removed this pull request from stack #88 November 18, 2026 02:26
@cowboyd
cowboyd added this pull request to stack #97 November 18, 2026 02:26
@cowboyd
cowboyd merged commit 6b5f693 into main Nov 18, 2026
8 of 10 checks passed
@cowboyd
cowboyd deleted the dom-create-document branch November 18, 2026 02:43
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