mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00
LibWeb: Throw pre insertion validity errors from the correct global
This commit is contained in:
parent
c7ad6cd508
commit
89fb783b42
Notes:
github-actions[bot]
2025-07-25 07:09:31 +00:00
Author: https://github.com/tcl3
Commit: 89fb783b42
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5597
Reviewed-by: https://github.com/gmta ✅
7 changed files with 2201 additions and 13 deletions
|
@ -839,7 +839,7 @@ WebIDL::ExceptionOr<void> Range::insert(GC::Ref<Node> node)
|
|||
parent = reference_node->parent();
|
||||
|
||||
// 6. Ensure pre-insertion validity of node into parent before referenceNode.
|
||||
TRY(parent->ensure_pre_insertion_validity(node, reference_node));
|
||||
TRY(parent->ensure_pre_insertion_validity(node->realm(), node, reference_node));
|
||||
|
||||
// 7. If range’s start node is a Text node, set referenceNode to the result of splitting it with offset range’s start offset.
|
||||
if (is<Text>(*m_start_container))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue