mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Add a flag to pause an HTML event loop's execution
This will be used to unblock the WebContent IPC event loop while waiting for a dialog response.
This commit is contained in:
parent
894bddf62c
commit
4b8729aea6
Notes:
sideshowbarker
2024-07-17 04:25:33 +09:00
Author: https://github.com/trflynn89
Commit: 4b8729aea6
Pull-request: https://github.com/SerenityOS/serenity/pull/16091
Reviewed-by: https://github.com/linusg
2 changed files with 12 additions and 0 deletions
|
@ -73,6 +73,10 @@ public:
|
|||
|
||||
double compute_deadline() const;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#pause
|
||||
void set_execution_paused(bool execution_paused) { m_execution_paused = execution_paused; }
|
||||
bool execution_paused() const { return m_execution_paused; }
|
||||
|
||||
private:
|
||||
Type m_type { Type::Window };
|
||||
|
||||
|
@ -104,6 +108,8 @@ private:
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#termination-nesting-level
|
||||
size_t m_termination_nesting_level { 0 };
|
||||
|
||||
bool m_execution_paused { false };
|
||||
};
|
||||
|
||||
EventLoop& main_thread_event_loop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue