LibWeb: Flesh out apply the history step to setup the navigation API

We now populate the navigation history entries in the navigation API and
fire more navigation events as appropriate.
This commit is contained in:
Andrew Kaster
2023-09-27 22:59:57 -06:00
committed by Alexander Kalenik
parent a8091c009b
commit 6c1944ee61
Notes: sideshowbarker 2024-07-16 22:34:39 +09:00
11 changed files with 339 additions and 78 deletions

View File

@@ -3,10 +3,10 @@
test(() => {
let n = window.navigation;
// FIXME: Once we set up the interaction between Navigables and Navigation,
// These two should become 1 and [object NavigationHistoryEntry], respectively
println(`entries is empty: ${n.entries().length == 0}`);
println(`currentEntry is null: ${n.currentEntry == null}`);
let len = n.entries().length;
println(`entries[length - 1] is current entry: ${n.entries()[len - 1] === n.currentEntry}`);
println(`currentEntry is a ${n.currentEntry}`);
println(`transition is null: ${n.transition == null}`);
println(`canGoBack: ${n.canGoBack}`);