LibWeb: Fire slotchange events when a slot is changed

This commit is contained in:
Shannon Booth 2025-03-08 16:03:54 +13:00 committed by Tim Flynn
commit b543523717
Notes: github-actions[bot] 2025-03-10 18:38:25 +00:00
7 changed files with 717 additions and 5 deletions

View file

@ -32,6 +32,10 @@ struct Agent {
// Each similar-origin window agent has a custom element reactions stack, which is initially empty.
CustomElementReactionsStack custom_element_reactions_stack {};
// https://dom.spec.whatwg.org/#signal-slot-list
// Each similar-origin window agent has signal slots (a set of slots), which is initially empty. [HTML]
Vector<GC::Root<HTML::HTMLSlotElement>> signal_slots;
// https://html.spec.whatwg.org/multipage/custom-elements.html#current-element-queue
// A similar-origin window agent's current element queue is the element queue at the top of its custom element reactions stack.
Vector<GC::Root<DOM::Element>>& current_element_queue() { return custom_element_reactions_stack.element_queue_stack.last(); }