1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:08:11 +00:00

LibWeb: Add option to TemporaryExecutionContext to prepare for callbacks

In the cases where spec authors have us directly interact with promises
in a task source context, we need to prepare the backup settings object
stack as well as push an actual execution context to the JS VM.
This commit is contained in:
Andrew Kaster 2024-01-18 13:04:52 -07:00 committed by Alexander Kalenik
parent 2cd93e6b58
commit 1358fe85b0
3 changed files with 14 additions and 3 deletions

View file

@ -1067,7 +1067,7 @@ bool Navigation::inner_navigate_event_firing_algorithm(
// 31. Prepare to run script given navigation's relevant settings object.
// NOTE: There's a massive spec note here
TemporaryExecutionContext execution_context { relevant_settings_object(*this) };
TemporaryExecutionContext execution_context { relevant_settings_object(*this), TemporaryExecutionContext::CallbacksEnabled::Yes };
// 32. If event's interception state is not "none":
if (event->interception_state() != NavigateEvent::InterceptionState::None) {