From 08b5cae199d0ea4010d381a13c1ea200faf1ad82 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Fri, 21 Feb 2025 13:23:34 +0000 Subject: [PATCH] LibWeb: Don't prepare script when src attribute is removed --- Libraries/LibWeb/HTML/HTMLScriptElement.cpp | 5 +++ .../remove-src-attr-prepare-a-script.txt | 6 ++++ .../remove-src-attr-prepare-a-script.html | 35 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 Tests/LibWeb/Text/expected/wpt-import/html/semantics/scripting-1/the-script-element/remove-src-attr-prepare-a-script.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/html/semantics/scripting-1/the-script-element/remove-src-attr-prepare-a-script.html diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index a549ee1938a..bd54619984f 100644 --- a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -64,6 +64,11 @@ void HTMLScriptElement::attribute_changed(FlyString const& name, Optional + + +Remove src attribute does not "prepare the script" + + + + + +