From 7b9138be55117be1921f9ba2676e50c34b0e511f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 20 Nov 2022 14:12:10 +0100 Subject: [PATCH] LibWeb: Add spec links to HTMLScriptElement member variables This makes it much easier to see which members represent something in the spec, and which ones are LibWeb implementation details. --- .../Libraries/LibWeb/HTML/HTMLScriptElement.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h index e241bca6a6..0deedae34f 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h @@ -64,13 +64,26 @@ public: void when_the_script_is_ready(Function); void begin_delaying_document_load_event(DOM::Document&); + // https://html.spec.whatwg.org/multipage/scripting.html#parser-document JS::GCPtr m_parser_document; + + // https://html.spec.whatwg.org/multipage/scripting.html#preparation-time-document JS::GCPtr m_preparation_time_document; + + // https://html.spec.whatwg.org/multipage/scripting.html#script-force-async bool m_non_blocking { false }; + + // https://html.spec.whatwg.org/multipage/scripting.html#already-started bool m_already_started { false }; + + // https://html.spec.whatwg.org/multipage/scripting.html#concept-script-external bool m_from_an_external_file { false }; + bool m_script_ready { false }; + + // https://html.spec.whatwg.org/multipage/scripting.html#ready-to-be-parser-executed bool m_ready_to_be_parser_executed { false }; + bool m_failed_to_load { false }; enum class ScriptType { @@ -78,12 +91,16 @@ public: Module }; + // https://html.spec.whatwg.org/multipage/scripting.html#concept-script-type ScriptType m_script_type { ScriptType::Classic }; + // https://html.spec.whatwg.org/multipage/scripting.html#steps-to-run-when-the-result-is-ready Function m_script_ready_callback; + // https://html.spec.whatwg.org/multipage/scripting.html#concept-script-result JS::GCPtr