Navigation/History Spec — pushState, popstate, hashchange, SPA Routing #99
Labels
No labels
bug
docs
feature
housekeeping
html-spec
performance
react-compat
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
glow-all/true-headless-browser#99
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue #99 — Navigation/History Session Spec — pushState, popstate, hashchange, SPA Routing
Problembeschreibung
Die Browser-Navigation und History-API ist inkomplett. Es gibt
history-patch.ts(Sprint 20), aber:history.pushState()existiert im Happy DOM nicht — wird durch einen Patch ersetzthistory.replaceState()updated nicht korrektlocation.hrefpopstate-Event wird nie gefeuert (keine Back/Forward-Navigation)hashchange-Event fehlt komplettlocation.hashÄnderungen triggern keinhashchangeWarum das blockiert:
location.hashfür Product-Tabs/Gallerylocation.replace()nach Challenge-ErfolgArchitektur-Analyse
Aktueller Stand (
src/fakes/history-patch.ts)Spec-konforme History API
Session-History-Entry:
Lösungsansätze
Option A — Full Session History (Empfohlen)
Eigene SessionHistory-Klasse mit Entry-Stack:
History Stack:
Location Integration:
Vorteile:
Nachteile:
Option B — History-Patch erweitern
Bestehenden
history-patch.tserweitern:Vorteile: Weniger Code (~200 Zeilen Änderungen)
Nachteile: Bleibt ein Patch, nie spec-konformer Entry-Stack
Entscheidung
Option A — Eigene SessionHistory. Der aktuelle Patch ist zu minimal. SPA-Routing erfordert korrekten Entry-Stack mit popstate-Event-Timing.
Akzeptanzkriterien
<a href="#section">Betroffene Dateien
src/fakes/history-patch.tssrc/navigation/session-history.tssrc/navigation/navigation.tssrc/navigation/location-api.tssrc/runtime-isolation.tssrc/pages/page.tstests/unit/session-history.test.tstests/integration/spa-routing.test.tsDependencies
Technische Risiken
scrollRestoration = 'auto'/'manual'ist nice-to-have, nicht criticalPerformance-Impact
Testplan
Unit (20+)
Integration (10+)
<a href="#section">→ hashchange + ScrollE2E (2)