1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +00:00

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.
This commit is contained in:
Andreas Kling 2021-09-26 12:22:16 +02:00
parent 8496024756
commit a2f77a2e39
3 changed files with 20 additions and 8 deletions

View file

@ -228,7 +228,7 @@ public:
void set_associated_inert_template_document(Document& document) { m_associated_inert_template_document = document; }
String ready_state() const;
void set_ready_state(HTML::DocumentReadyState);
void update_readiness(HTML::DocumentReadyState);
void ref_from_node(Badge<Node>)
{
@ -359,7 +359,7 @@ private:
bool m_created_for_appropriate_template_contents { false };
RefPtr<Document> m_associated_inert_template_document;
HTML::DocumentReadyState m_ready_state { HTML::DocumentReadyState::Loading };
HTML::DocumentReadyState m_readiness { HTML::DocumentReadyState::Loading };
String m_content_type { "application/xml" };
Optional<String> m_encoding;