Skip to content

Add WPT lifecycle and URL variants to unlock focus navigation tests - #112

Merged
cowboyd merged 1 commit into
mainfrom
wpt-document-lifecycle
Dec 3, 2026
Merged

cowboyd merged 1 commit into
mainfrom
wpt-document-lifecycle

Conversation

@cowboyd

@cowboyd cowboyd commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Some WPT files choose scenarios through URL variants or register tests from a Window DOMContentLoaded listener. The harness now runs each declared variant in a fresh worker with its own document and URL, then delivers document readiness changes, bubbling DOMContentLoaded, and Window load through the implementation's event system.

The UI provides a Window implementation that can initialize any object as a Window. Then, the harness requires a hook to create not the document but the window passing the worker's globalThis as its argument. This allows us to initialize the global and so preserve globalThis === window === document.defaultView. This is safe because the scope is thrown away after each test suite.

The lifecycle and URL behavior is needed by later focus-navigation and input-editing PRs, including table-caption navigation cases registered from DOMContentLoaded.

Type of change

  • Feature
  • Tests / WPT coverage

AI-generated code disclosure

  • This PR includes AI-generated code

@pkg-pr-new

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

Copy link
Copy Markdown

commit: c58e5c2

@cowboyd
cowboyd added this pull request to stack #114 November 30, 2026 15:21
@cowboyd
cowboyd marked this pull request as ready for review November 30, 2026 15:35
@cowboyd
cowboyd force-pushed the wpt-document-lifecycle branch from 9943043 to 5985ac5 Compare December 1, 2026 18:17
@cowboyd
cowboyd force-pushed the dom-event-capture branch 3 times, most recently from cf92360 to cfea48f Compare December 2, 2026 14:58
@cowboyd
cowboyd force-pushed the wpt-document-lifecycle branch from 5985ac5 to 7f583c1 Compare December 2, 2026 14:58
@cowboyd
cowboyd force-pushed the wpt-document-lifecycle branch from 7f583c1 to c233ece Compare December 2, 2026 17:26
Base automatically changed from dom-event-capture to main December 2, 2026 19:20
@dreyfus92

Copy link
Copy Markdown
Member

@cowboyd when you get a chance can you resolve conflicts?

Comment thread packages/ui/src/dom.ts Resolved
@cowboyd
cowboyd marked this pull request as draft December 2, 2026 22:21
@cowboyd cowboyd added the input focus, keyboard, editing, mouse, anything coming from the release. label Dec 2, 2026
@cowboyd cowboyd added this to the Alpha-1 milestone Dec 2, 2026
@cowboyd
cowboyd removed this pull request from stack #114 December 2, 2026 22:23
@cowboyd
cowboyd force-pushed the wpt-document-lifecycle branch 4 times, most recently from 8760767 to 7bb1c3a Compare December 3, 2026 06:17
@cowboyd
cowboyd marked this pull request as ready for review December 3, 2026 06:20
@cowboyd
cowboyd requested a review from 43081j December 3, 2026 06:20
Comment thread packages/ui/src/window.ts Resolved
Comment thread packages/ui/src/window.ts Resolved
@cowboyd
cowboyd force-pushed the wpt-document-lifecycle branch from 7bb1c3a to c58e5c2 Compare December 3, 2026 16:44
@cowboyd
cowboyd requested a review from natemoo-re December 3, 2026 17:20
@cowboyd
cowboyd requested a review from 43081j December 3, 2026 17:20
@cowboyd
cowboyd merged commit 6605ed0 into main Dec 3, 2026
9 checks passed
@cowboyd
cowboyd deleted the wpt-document-lifecycle branch December 3, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

input focus, keyboard, editing, mouse, anything coming from the release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants