File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Userland/Libraries/LibWeb/HTML/Parser Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -175,11 +175,22 @@ void HTMLParser::run(const AK::URL& url)
175
175
176
176
flush_character_insertions ();
177
177
178
- // "The end"
178
+ the_end ();
179
+ }
180
+
181
+ // https://html.spec.whatwg.org/multipage/parsing.html#the-end
182
+ void HTMLParser::the_end ()
183
+ {
184
+ // Once the user agent stops parsing the document, the user agent must run the following steps:
185
+
186
+ // FIXME: 1. If the active speculative HTML parser is not null, then stop the speculative HTML parser and return.
187
+
188
+ // FIXME: 2. Set the insertion point to undefined.
179
189
190
+ // 3. Update the current document readiness to "interactive".
180
191
m_document->set_ready_state (" interactive" );
181
192
182
- // 3 . Pop all the nodes off the stack of open elements.
193
+ // 4 . Pop all the nodes off the stack of open elements.
183
194
while (!m_stack_of_open_elements.is_empty ())
184
195
m_stack_of_open_elements.pop ();
185
196
Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ class HTMLParser {
94
94
void handle_after_frameset (HTMLToken&);
95
95
void handle_after_after_frameset (HTMLToken&);
96
96
97
+ void the_end ();
98
+
97
99
void stop_parsing () { m_stop_parsing = true ; }
98
100
99
101
void generate_implied_end_tags (const FlyString& exception = {});
You can’t perform that action at this time.
0 commit comments