From e54ae1bd116e780783b8af9f7fe87c7396a726a6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 20 Nov 2022 20:56:38 +0100 Subject: [PATCH] LibWeb: Don't implement bogus assertion in prepare-the-script-element The HTML spec is asking us to make a possibly-bogus assertion, so let's disable it for now. Spec bug: https://github.com/whatwg/html/issues/8534 --- Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index 7eb4e30f6b..7d598db8bc 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -394,10 +394,9 @@ void HTMLScriptElement::prepare_script() } // 32. If el's type is "classic" and el has a src attribute, or el's type is "module": - if ((m_script_type == ScriptType::Classic && has_attribute(HTML::AttributeNames::src)) - || m_script_type == ScriptType::Module) { + if ((m_script_type == ScriptType::Classic && has_attribute(HTML::AttributeNames::src)) || m_script_type == ScriptType::Module) { // 1. Assert: el's result is "uninitialized". - VERIFY(m_result.has()); + // FIXME: I believe this step to be a spec bug, and it should be removed: https://github.com/whatwg/html/issues/8534 // 2. If el has an async attribute or el's force async is true: if (has_attribute(HTML::AttributeNames::async) || m_force_async) {