소스 검색

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.
Andreas Kling 2 년 전
부모
커밋
7b9138be55
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17 0
      Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h

+ 17 - 0
Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h

@@ -64,13 +64,26 @@ public:
     void when_the_script_is_ready(Function<void()>);
     void when_the_script_is_ready(Function<void()>);
     void begin_delaying_document_load_event(DOM::Document&);
     void begin_delaying_document_load_event(DOM::Document&);
 
 
+    // https://html.spec.whatwg.org/multipage/scripting.html#parser-document
     JS::GCPtr<DOM::Document> m_parser_document;
     JS::GCPtr<DOM::Document> m_parser_document;
+
+    // https://html.spec.whatwg.org/multipage/scripting.html#preparation-time-document
     JS::GCPtr<DOM::Document> m_preparation_time_document;
     JS::GCPtr<DOM::Document> m_preparation_time_document;
+
+    // https://html.spec.whatwg.org/multipage/scripting.html#script-force-async
     bool m_non_blocking { false };
     bool m_non_blocking { false };
+
+    // https://html.spec.whatwg.org/multipage/scripting.html#already-started
     bool m_already_started { false };
     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_from_an_external_file { false };
+
     bool m_script_ready { 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_ready_to_be_parser_executed { false };
+
     bool m_failed_to_load { false };
     bool m_failed_to_load { false };
 
 
     enum class ScriptType {
     enum class ScriptType {
@@ -78,12 +91,16 @@ public:
         Module
         Module
     };
     };
 
 
+    // https://html.spec.whatwg.org/multipage/scripting.html#concept-script-type
     ScriptType m_script_type { ScriptType::Classic };
     ScriptType m_script_type { ScriptType::Classic };
 
 
+    // https://html.spec.whatwg.org/multipage/scripting.html#steps-to-run-when-the-result-is-ready
     Function<void()> m_script_ready_callback;
     Function<void()> m_script_ready_callback;
 
 
+    // https://html.spec.whatwg.org/multipage/scripting.html#concept-script-result
     JS::GCPtr<Script> m_script;
     JS::GCPtr<Script> m_script;
 
 
+    // https://html.spec.whatwg.org/multipage/scripting.html#concept-script-delay-load
     Optional<DOM::DocumentLoadEventDelayer> m_document_load_event_delayer;
     Optional<DOM::DocumentLoadEventDelayer> m_document_load_event_delayer;
 
 
     size_t m_source_line_number { 1 };
     size_t m_source_line_number { 1 };