mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 03:27:15 +02:00
LibWeb: Port EventLoop::spin_XXX to HeapFunction
This commit is contained in:
committed by
Alexander Kalenik
parent
29cea5bd24
commit
1c18b900e2
Notes:
github-actions[bot]
2024-10-30 19:57:02 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/1c18b900e28 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2062 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -86,7 +86,7 @@ void HTMLScriptElement::execute_script()
|
||||
// https://html.spec.whatwg.org/multipage/document-lifecycle.html#read-html
|
||||
// Before any script execution occurs, the user agent must wait for scripts may run for the newly-created document to be true for document.
|
||||
if (!m_document->ready_to_run_scripts())
|
||||
main_thread_event_loop().spin_until([&] { return m_document->ready_to_run_scripts(); });
|
||||
main_thread_event_loop().spin_until(JS::create_heap_function(heap(), [&] { return m_document->ready_to_run_scripts(); }));
|
||||
|
||||
// 1. Let document be el's node document.
|
||||
JS::NonnullGCPtr<DOM::Document> document = this->document();
|
||||
|
||||
Reference in New Issue
Block a user