LibWeb: Throw pre insertion validity errors from the correct global

This commit is contained in:
Tim Ledbetter 2025-07-25 03:35:01 +01:00 committed by Jelle Raaijmakers
commit 89fb783b42
Notes: github-actions[bot] 2025-07-25 07:09:31 +00:00
7 changed files with 2201 additions and 13 deletions

View file

@ -237,7 +237,7 @@ WebIDL::ExceptionOr<void> ParentNode::replace_children(Vector<Variant<GC::Root<N
auto node = TRY(convert_nodes_to_single_node(nodes, document()));
// 2. Ensure pre-insertion validity of node into this before null.
TRY(ensure_pre_insertion_validity(node, nullptr));
TRY(ensure_pre_insertion_validity(realm(), node, nullptr));
// 3. Replace all with node within this.
replace_all(*node);