mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 06:40:05 +00:00
LibWeb: Port EventLoop::spin_XXX to HeapFunction
This commit is contained in:
parent
29cea5bd24
commit
1c18b900e2
Notes:
github-actions[bot]
2024-10-30 19:57:02 +00:00
Author: https://github.com/shannonbooth
Commit: 1c18b900e2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2062
Reviewed-by: https://github.com/kalenikaliaksandr ✅
14 changed files with 68 additions and 65 deletions
|
@ -61,7 +61,7 @@ void SVGScriptElement::process_the_script_element()
|
|||
// 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())
|
||||
HTML::main_thread_event_loop().spin_until([&] { return m_document->ready_to_run_scripts(); });
|
||||
HTML::main_thread_event_loop().spin_until(JS::create_heap_function(heap(), [&] { return m_document->ready_to_run_scripts(); }));
|
||||
|
||||
// FIXME: Support non-inline scripts.
|
||||
auto& settings_object = document().relevant_settings_object();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue