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:
parent
191c87f1cd
commit
708263790a
2 changed files with 25 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue