mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 15:49:15 +00:00
LibWeb: Set HTMLParser::m_scripting_enabled as according to the spec
This allows <noscript> elements to display their content as proper HTML instead of raw text when scripting is disabled.
This commit is contained in:
parent
dfe57543a4
commit
7b8a6b8e7a
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/Lubrsi
Commit: 7b8a6b8e7a
Pull-request: https://github.com/SerenityOS/serenity/pull/15330
2 changed files with 7 additions and 1 deletions
|
@ -121,6 +121,7 @@ static bool is_html_integration_point(DOM::Element const& element)
|
|||
|
||||
HTMLParser::HTMLParser(DOM::Document& document, StringView input, String const& encoding)
|
||||
: m_tokenizer(input, encoding)
|
||||
, m_scripting_enabled(document.is_scripting_enabled())
|
||||
, m_document(JS::make_handle(document))
|
||||
{
|
||||
m_tokenizer.set_parser({}, *this);
|
||||
|
@ -132,7 +133,8 @@ HTMLParser::HTMLParser(DOM::Document& document, StringView input, String const&
|
|||
}
|
||||
|
||||
HTMLParser::HTMLParser(DOM::Document& document)
|
||||
: m_document(JS::make_handle(document))
|
||||
: m_scripting_enabled(document.is_scripting_enabled())
|
||||
, m_document(JS::make_handle(document))
|
||||
{
|
||||
m_document->set_parser({}, *this);
|
||||
m_tokenizer.set_parser({}, *this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue