mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Delay module script execution until current script has ended
This commit is contained in:
committed by
Jelle Raaijmakers
parent
e73e0b3c92
commit
24a7eac4ab
Notes:
github-actions[bot]
2025-10-16 14:49:17 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/24a7eac4ab3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6492 Reviewed-by: https://github.com/gmta ✅
@@ -466,11 +466,14 @@ void HTMLScriptElement::prepare_script()
|
||||
begin_delaying_document_load_event(*m_preparation_time_document);
|
||||
|
||||
auto steps = create_on_fetch_script_complete(heap(), [this](auto result) {
|
||||
// 1. Mark as ready el given result.
|
||||
if (!result)
|
||||
mark_as_ready(ResultState::Null {});
|
||||
else
|
||||
mark_as_ready(Result(*result));
|
||||
// 1. Queue an element task on the networking task source given el to perform the following steps:
|
||||
queue_an_element_task(Task::Source::Networking, [this, result = move(result)] {
|
||||
// 1. Mark as ready el given result.
|
||||
if (!result)
|
||||
mark_as_ready(ResultState::Null {});
|
||||
else
|
||||
mark_as_ready(Result(*result));
|
||||
});
|
||||
});
|
||||
|
||||
// 2. Fetch an inline module script graph, given source text, base URL, settings object, options, and with the following steps given result:
|
||||
|
||||
Reference in New Issue
Block a user