LibWeb: Implement prepare_to_run_script on a Realm&

Making further progress porting away from depending on the
EnvironmentSettingObject.
This commit is contained in:
Shannon Booth 2024-10-21 20:09:02 +13:00 committed by Andrew Kaster
commit 8dffd8e7d6
Notes: github-actions[bot] 2024-11-01 19:16:18 +00:00
10 changed files with 40 additions and 36 deletions

View file

@ -1402,6 +1402,7 @@ void Navigation::initialize_the_navigation_api_entries_for_a_new_document(Vector
}
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#update-the-navigation-api-entries-for-a-same-document-navigation
// https://whatpr.org/html/9893/nav-history-apis.html#update-the-navigation-api-entries-for-a-same-document-navigation
void Navigation::update_the_navigation_api_entries_for_a_same_document_navigation(JS::NonnullGCPtr<SessionHistoryEntry> destination_she, Bindings::NavigationType navigation_type)
{
auto& realm = relevant_realm(*this);
@ -1482,8 +1483,8 @@ void Navigation::update_the_navigation_api_entries_for_a_same_document_navigatio
if (m_ongoing_api_method_tracker != nullptr)
notify_about_the_committed_to_entry(*m_ongoing_api_method_tracker, *current_entry());
// 9. Prepare to run script given navigation's relevant settings object.
relevant_settings_object(*this).prepare_to_run_script();
// 9. Prepare to run script given navigation's relevant realm.
prepare_to_run_script(realm);
// 10. Fire an event named currententrychange at navigation using NavigationCurrentEntryChangeEvent,
// with its navigationType attribute initialized to navigationType and its from initialized to oldCurrentNHE.