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

LibWeb: Implement reload for navigables

This commit is contained in:
Aliaksandr Kalenik 2023-04-07 00:08:39 +03:00 committed by Andreas Kling
parent 21f39061fd
commit ffd5b3da16
4 changed files with 28 additions and 0 deletions

View file

@ -951,4 +951,19 @@ WebIDL::ExceptionOr<void> Navigable::navigate_to_a_javascript_url(AK::URL const&
TODO();
}
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#reload
void Navigable::reload()
{
// 1. Set navigable's active session history entry's document state's reload pending to true.
active_session_history_entry()->document_state->set_reload_pending(true);
// 2. Let traversable be navigable's traversable navigable.
auto traversable = traversable_navigable();
// FIXME: 3. Append the following session history traversal steps to traversable:
// 1. Apply pending history changes to traversable with true.
traversable->apply_pending_history_changes();
}
}