mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibWeb: Expose ParentNode.{first,last}ElementChild
I needed these to write the event dispatcher test.
This commit is contained in:
@@ -70,4 +70,14 @@ NonnullRefPtrVector<Element> ParentNode::query_selector_all(const StringView& se
|
||||
return elements;
|
||||
}
|
||||
|
||||
RefPtr<Element> ParentNode::first_element_child()
|
||||
{
|
||||
return first_child_of_type<Element>();
|
||||
}
|
||||
|
||||
RefPtr<Element> ParentNode::last_element_child()
|
||||
{
|
||||
return last_child_of_type<Element>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user