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

LibWeb: Add index and length into HTML::History

This commit is contained in:
Aliaksandr Kalenik 2023-09-23 22:57:04 +02:00 committed by Andrew Kaster
parent 0f8ae12d44
commit 40cbe9e72b
3 changed files with 11 additions and 10 deletions

View file

@ -1744,9 +1744,11 @@ void perform_url_and_history_update_steps(DOM::Document& document, AK::URL new_u
// 6. If historyHandling is "push", then:
if (history_handling == HistoryHandlingBehavior::Push) {
// FIXME: 1. Increment document's history object's index.
// FIXME: 2. Set document's history object's length to its index + 1.
TODO();
// 1. Increment document's history object's index.
document.history()->m_index++;
// 2. Set document's history object's length to its index + 1.
document.history()->m_length = document.history()->m_index + 1;
}
// FIXME: 7. If serializedData is not null, then restore the history object state given document and newEntry.