mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Return actual callback object from NodeIterator::filter
This commit is contained in:
parent
05779fbd17
commit
95949ba8f2
Notes:
github-actions[bot]
2025-02-24 17:30:16 +00:00
Author: https://github.com/Lubrsi
Commit: 95949ba8f2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3685
Reviewed-by: https://github.com/gmta ✅
5 changed files with 1000 additions and 2 deletions
|
@ -136,6 +136,15 @@ JS::ThrowCompletionOr<GC::Ptr<Node>> NodeIterator::traverse(Direction direction)
|
|||
return candidate;
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-traversal-filter
|
||||
JS::Object* NodeIterator::filter() const
|
||||
{
|
||||
if (!m_filter)
|
||||
return nullptr;
|
||||
|
||||
return m_filter->callback().callback;
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-node-filter
|
||||
JS::ThrowCompletionOr<NodeFilter::Result> NodeIterator::filter(Node& node)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue