mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Add the type field to DOM::Document
This patch adds the document type concept to documents and sets it in various places.
This commit is contained in:
parent
baac3ba60c
commit
6805baeedd
Notes:
sideshowbarker
2024-07-17 09:43:50 +09:00
Author: https://github.com/networkException
Commit: 6805baeedd
Pull-request: https://github.com/SerenityOS/serenity/pull/14472
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/nico
5 changed files with 19 additions and 5 deletions
|
@ -25,7 +25,8 @@ NonnullRefPtr<DOM::Document> DOMParser::parse_from_string(String const& string,
|
|||
// 2. Switch on type:
|
||||
if (type == Bindings::DOMParserSupportedType::Text_Html) {
|
||||
// -> "text/html"
|
||||
// FIXME: 1. Set document's type to "html".
|
||||
// 1. Set document's type to "html".
|
||||
document->set_document_type(DOM::Document::Type::HTML);
|
||||
|
||||
// 2. Create an HTML parser parser, associated with document.
|
||||
// 3. Place string into the input stream for parser. The encoding confidence is irrelevant.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue