mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +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:
parent
7870f10aa8
commit
e9da74ebe0
5 changed files with 254 additions and 1 deletions
|
@ -47,4 +47,19 @@ private:
|
|||
JS::GCPtr<HTML::HTMLSlotElement> m_manual_slot_assignment;
|
||||
};
|
||||
|
||||
enum class OpenFlag {
|
||||
Set,
|
||||
Unset,
|
||||
};
|
||||
|
||||
JS::GCPtr<HTML::HTMLSlotElement> assigned_slot_for_node(JS::NonnullGCPtr<Node>);
|
||||
bool is_an_assigned_slottable(JS::NonnullGCPtr<Node>);
|
||||
|
||||
JS::GCPtr<HTML::HTMLSlotElement> find_a_slot(Slottable const&, OpenFlag = OpenFlag::Unset);
|
||||
Vector<Slottable> find_slottables(JS::NonnullGCPtr<HTML::HTMLSlotElement>);
|
||||
void assign_slottables(JS::NonnullGCPtr<HTML::HTMLSlotElement>);
|
||||
void assign_slottables_for_a_tree(JS::NonnullGCPtr<Node>);
|
||||
void assign_a_slot(Slottable const&);
|
||||
void signal_a_slot_change(JS::NonnullGCPtr<HTML::HTMLSlotElement>);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue