1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibWeb: Implement document ready state

This commit is contained in:
Luke 2020-08-31 13:56:16 +01:00 committed by Andreas Kling
parent 8aabec1c94
commit 124c52b3b5
5 changed files with 49 additions and 0 deletions

View file

@ -41,6 +41,7 @@
#include <LibWeb/DOM/DocumentType.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/DOM/ElementFactory.h>
#include <LibWeb/DOM/Event.h>
#include <LibWeb/DOM/Text.h>
#include <LibWeb/DOM/Window.h>
#include <LibWeb/HTML/AttributeNames.h>
@ -522,4 +523,10 @@ void Document::set_focused_element(Element* element)
m_layout_root->set_needs_display();
}
void Document::set_ready_state(const String& ready_state)
{
m_ready_state = ready_state;
dispatch_event(Event::create("readystatechange"));
}
}