LibWeb/DOM: Create TreeWalker in document's realm

This commit is contained in:
Shannon Booth 2025-01-10 16:09:53 +13:00 committed by Sam Atkins
commit 17c92d7c2b
Notes: github-actions[bot] 2025-01-10 08:09:54 +00:00
4 changed files with 10 additions and 11 deletions

View file

@ -3342,7 +3342,7 @@ GC::Ref<NodeIterator> Document::create_node_iterator(Node& root, unsigned what_t
// https://dom.spec.whatwg.org/#dom-document-createtreewalker
GC::Ref<TreeWalker> Document::create_tree_walker(Node& root, unsigned what_to_show, GC::Ptr<NodeFilter> filter)
{
return TreeWalker::create(root, what_to_show, filter);
return TreeWalker::create(realm(), root, what_to_show, filter);
}
void Document::register_node_iterator(Badge<NodeIterator>, NodeIterator& node_iterator)