mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibWeb: Make NodeList GC-allocated
This commit is contained in:
parent
8f4ea4e308
commit
48e0066371
16 changed files with 128 additions and 57 deletions
|
@ -38,7 +38,7 @@ ExceptionOr<JS::GCPtr<Element>> ParentNode::query_selector(StringView selector_t
|
|||
return result;
|
||||
}
|
||||
|
||||
ExceptionOr<NonnullRefPtr<NodeList>> ParentNode::query_selector_all(StringView selector_text)
|
||||
ExceptionOr<JS::NonnullGCPtr<NodeList>> ParentNode::query_selector_all(StringView selector_text)
|
||||
{
|
||||
auto maybe_selectors = parse_selector(CSS::Parser::ParsingContext(*this), selector_text);
|
||||
if (!maybe_selectors.has_value())
|
||||
|
@ -57,7 +57,7 @@ ExceptionOr<NonnullRefPtr<NodeList>> ParentNode::query_selector_all(StringView s
|
|||
return IterationDecision::Continue;
|
||||
});
|
||||
|
||||
return StaticNodeList::create(move(elements));
|
||||
return StaticNodeList::create(window(), move(elements));
|
||||
}
|
||||
|
||||
JS::GCPtr<Element> ParentNode::first_element_child()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue