mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-18 23:12:02 +00:00
LibWeb: Set correct content and document types in DOMParser
It appears this was removed by accident in an earlier commit, regressing the included WPT test.
This commit is contained in:
parent
bfa978c501
commit
c834c594ac
Notes:
github-actions[bot]
2025-07-09 08:11:21 +00:00
Author: https://github.com/veeti
Commit: c834c594ac
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5363
Reviewed-by: https://github.com/shannonbooth ✅
3 changed files with 103 additions and 0 deletions
|
@ -49,6 +49,8 @@ GC::Ref<DOM::Document> DOMParser::parse_from_string(StringView string, Bindings:
|
|||
if (type == Bindings::DOMParserSupportedType::Text_Html) {
|
||||
// -> "text/html"
|
||||
document = HTML::HTMLDocument::create(realm(), associated_document.url());
|
||||
document->set_content_type(Bindings::idl_enum_to_string(type));
|
||||
document->set_document_type(DOM::Document::Type::HTML);
|
||||
|
||||
// 1. Parse HTML from a string given document and compliantString. FIXME: Use compliantString.
|
||||
document->parse_html_from_a_string(string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue