diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-26 12:22:16 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-26 12:47:51 +0200 |
commit | a2f77a2e3966db737c74e5c7c4d53610969d7302 (patch) | |
tree | 68f87b588de8b04548528fa5fa8efd86a3a39058 /Userland/Libraries/LibWeb/HTML/Parser | |
parent | 84960247563a103b4cc330e9b07f936bd5f93a10 (diff) | |
download | serenity-a2f77a2e3966db737c74e5c7c4d53610969d7302.zip |
LibWeb: Implement "update the current document readiness" from spec
The only difference from what we were already doing is that setting the
same ready state twice no longer fires a "readystatechange" event.
I don't think that could happen in practice though.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Parser')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index e3fb50a352..8f84c18adb 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -188,7 +188,7 @@ void HTMLParser::the_end() // FIXME: 2. Set the insertion point to undefined. // 3. Update the current document readiness to "interactive". - m_document->set_ready_state(HTML::DocumentReadyState::Interactive); + m_document->update_readiness(HTML::DocumentReadyState::Interactive); // 4. Pop all the nodes off the stack of open elements. while (!m_stack_of_open_elements.is_empty()) @@ -240,7 +240,7 @@ void HTMLParser::the_end() // 9. Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following steps: queue_global_task(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document]() mutable { // 1. Update the current document readiness to "complete". - document->set_ready_state(HTML::DocumentReadyState::Complete); + document->update_readiness(HTML::DocumentReadyState::Complete); // 2. If the Document object's browsing context is null, then abort these steps. if (!document->browsing_context()) |