mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: Parse barebones document without doctype, <html>, etc.
Last night I tried making a little test page that had a bunch of <img> elements and nothing else. It didn't work. Fix this by correctly adding a synthesized <html> element to the document if we get something else in the "before html insertion mode.
This commit is contained in:
parent
d5ae73a63b
commit
410fa5abe0
Notes:
sideshowbarker
2024-07-19 05:54:01 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/410fa5abe0f
1 changed files with 1 additions and 0 deletions
|
@ -214,6 +214,7 @@ void HTMLDocumentParser::handle_before_html(HTMLToken& token)
|
|||
|
||||
AnythingElse:
|
||||
auto element = create_element(document(), "html");
|
||||
document().append_child(element);
|
||||
m_stack_of_open_elements.push(element);
|
||||
// FIXME: If the Document is being loaded as part of navigation of a browsing context, then: run the application cache selection algorithm with no manifest, passing it the Document object.
|
||||
m_insertion_mode = InsertionMode::BeforeHead;
|
||||
|
|
Loading…
Add table
Reference in a new issue