1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:58:12 +00:00

LibWeb: Implement manual slottable assignment

This implements manual slottable assignment by way of HTMLSlotElement's
`assign` API. This includes all of the slottable-related AOs needed to
perform the assignment.
This commit is contained in:
Timothy Flynn 2023-09-05 15:05:46 -04:00 committed by Andreas Kling
parent 7870f10aa8
commit e9da74ebe0
5 changed files with 254 additions and 1 deletions

View file

@ -1,3 +1,6 @@
#import <DOM/Element.idl>
#import <DOM/Node.idl>
#import <DOM/Text.idl>
#import <HTML/HTMLElement.idl>
// https://html.spec.whatwg.org/multipage/scripting.html#htmlslotelement
@ -7,5 +10,11 @@ interface HTMLSlotElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions, Reflect] attribute DOMString name;
sequence<Node> assignedNodes(optional AssignedNodesOptions options = {});
sequence<Element> assignedElements(optional AssignedNodesOptions options = {});
undefined assign((Element or Text)... nodes);
};
dictionary AssignedNodesOptions {
boolean flatten = false;
};