mirror of
https://github.com/RGBCube/serenity
synced 2025-06-29 10:12:08 +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
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