mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
The getter compares the current entry index against the entry list's size, but valid indices are in the range [0, size - 1]. An index equal to size is a past-the-end state that never occurs in practice, so the function always returns true for any valid index. This means it reports forward navigation is possible even when the current entry is the last one in the list, where forward() immediately throws an InvalidStateError. The symmetric can_go_back() correctly checks against index 0, and forward() correctly checks against size - 1. This brings can_go_forward() in line with both.
6 lines
154 B
Plaintext
6 lines
154 B
Plaintext
entries[length - 1] is current entry: true
|
|
currentEntry is a [object NavigationHistoryEntry]
|
|
transition is null: true
|
|
canGoBack: true
|
|
canGoForward: false
|