From c0b8f47a76e5a47e1dcf2c6e5a1a84f7b9efcfba Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 27 Nov 2025 15:57:18 +0000 Subject: [PATCH] LibWeb/HTML: Move connectedness check for script post_connection() Corresponds to: https://github.com/whatwg/html/commit/905384d140e5a5f093bb024114fd59aee40a30d8 Also import the test added along with that change. --- Libraries/LibWeb/HTML/HTMLScriptElement.cpp | 29 ++++++------ ...later-script-removed-by-earlier-script.txt | 7 +++ ...ater-script-removed-by-earlier-script.html | 45 +++++++++++++++++++ 3 files changed, 67 insertions(+), 14 deletions(-) create mode 100644 Tests/LibWeb/Text/expected/wpt-import/dom/nodes/insertion-removing-steps/later-script-removed-by-earlier-script.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/dom/nodes/insertion-removing-steps/later-script-removed-by-earlier-script.html diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index a085e91d25d..a09baa6d011 100644 --- a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -63,7 +63,7 @@ void HTMLScriptElement::attribute_changed(FlyString const& name, Optional + +A later-inserted script removed by an earlier-inserted script does not run + + + + +