LibWeb/HTML: Add environment discarding steps

Exactly one place seems to define these at the moment: service worker
clients. Since we don't have a type for these and just use
EnvironmentSettingsObject, I've put it there.
This commit is contained in:
Sam Atkins 2025-03-12 12:07:25 +00:00 committed by Jelle Raaijmakers
commit 5a4f15d8f5
Notes: github-actions[bot] 2025-03-14 17:06:43 +00:00
4 changed files with 24 additions and 2 deletions

View file

@ -1287,7 +1287,13 @@ WebIDL::ExceptionOr<void> Navigable::populate_session_history_entry_document(
// 4. If navigationParams is not null, then:
if (!navigation_params.has<NullOrError>()) {
// FIXME: 1. Run the environment discarding steps for navigationParams's reserved environment.
// 1. Run the environment discarding steps for navigationParams's reserved environment.
navigation_params.visit(
[](GC::Ref<NavigationParams> const& it) {
it->reserved_environment->discard_environment();
},
[](auto const&) {});
// FIXME: 2. Invoke WebDriver BiDi navigation failed with navigable and a new WebDriver BiDi navigation status whose id is navigationId, status is "canceled", and url is navigationParams's response's URL.
}
}