1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:37:44 +00:00

LibWeb: Implement LiveNodeList::first_matching

This function returns the first element which matches both the filter
for the LiveNodeList collection itself, and a further filter that is
supplied as an argument to this function.
This commit is contained in:
Shannon Booth 2023-08-25 12:16:44 +12:00 committed by Andreas Kling
parent 191c87f1cd
commit 708263790a
2 changed files with 25 additions and 0 deletions

View file

@ -34,6 +34,8 @@ public:
protected:
LiveNodeList(JS::Realm&, Node& root, Scope, Function<bool(Node const&)> filter);
Node* first_matching(Function<bool(Node const&)> const& filter) const;
private:
virtual void visit_edges(Cell::Visitor&) override;