Skip to content

WebAPI: much better shadowdom slot support#2720

Merged
karlseguin merged 3 commits into
mainfrom
slot
Jun 16, 2026
Merged

WebAPI: much better shadowdom slot support#2720
karlseguin merged 3 commits into
mainfrom
slot

Conversation

@karlseguin

Copy link
Copy Markdown
Collaborator

This adds more comprehensive and correct support for slot assignment. The changes can be broken down into 3 buckets:

1 - Slot.assign is now implemented, and general correctness around finding/
assigning slots (e.g. Text.assignedSlot)

2 - Event dispatching for "composed" (propagating through the shadowdom) better,
specifically around the composedPath and slots

3 - The slotchange event is fires at the right time (snapshot before mutation
fire after mutation).

A number of WPT tests now pass, and there should be real-world impact for slot-heavy frameworks (e.g. lit)

This adds more comprehensive and correct support for slot assignment. The
changes can be broken down into 3 buckets:

1 - Slot.assign is now implemented, and general correctness around finding/
    assigning slots (e.g. Text.assignedSlot)

2 - Event dispatching for "composed" (propagating through the shadowdom) better,
    specifically around the composedPath and slots

3 - The slotchange event is fires at the right time (snapshot before mutation
    fire after mutation).

A number of WPT tests now pass, and there should be real-world impact for
slot-heavy frameworks (e.g. lit)
Move a lot of the Frame.slot* methods to a dedicated slotting.zig file. Frame
is already quite big, and this just helps tidy things up a bit.
@karlseguin karlseguin merged commit a32b72e into main Jun 16, 2026
23 checks passed
@karlseguin karlseguin deleted the slot branch June 16, 2026 11:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants