mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +00:00
LibWeb: Implement document ready state
This commit is contained in:
parent
8aabec1c94
commit
124c52b3b5
Notes:
sideshowbarker
2024-07-19 02:57:34 +09:00
Author: https://github.com/Lubrsi
Commit: 124c52b3b5
Pull-request: https://github.com/SerenityOS/serenity/pull/3364
5 changed files with 49 additions and 0 deletions
|
@ -156,6 +156,8 @@ void HTMLDocumentParser::run(const URL& url)
|
|||
|
||||
// "The end"
|
||||
|
||||
m_document->set_ready_state("interactive");
|
||||
|
||||
auto scripts_to_execute_when_parsing_has_finished = m_document->take_scripts_to_execute_when_parsing_has_finished({});
|
||||
for (auto& script : scripts_to_execute_when_parsing_has_finished) {
|
||||
script.execute_script();
|
||||
|
@ -167,6 +169,8 @@ void HTMLDocumentParser::run(const URL& url)
|
|||
for (auto& script : scripts_to_execute_as_soon_as_possible) {
|
||||
script.execute_script();
|
||||
}
|
||||
|
||||
m_document->set_ready_state("complete");
|
||||
}
|
||||
|
||||
void HTMLDocumentParser::process_using_the_rules_for(InsertionMode mode, HTMLToken& token)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue