-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
A-constellationInvolves the constellationInvolves the constellationA-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentB-metaThis issue tracks the status of multiple, related pieces of workThis issue tracks the status of multiple, related pieces of work
Description
This issue will keep track of everything needed to fully implement the History API
The History interface:
-
ScrollRestorationenum and attribute -
lengthattribute (Implement history.length #12685) -
go([ delta ])method (History interface Go, Back, and Forward #12552) -
back()method (Implement History's back/forward APIs #5670 History interface Go, Back, and Forward #12552) -
forward()method (Implement History's back/forward APIs #5670 History interface Go, Back, and Forward #12552) -
stateattribute (Implement History State #20638) -
pushState(data, title [, url ])method (Implement History State #20638) -
replaceState(data, title [, url ])method (Implement History State #20638) - traverse the history by a delta (History interface Go, Back, and Forward #12552)
- Make these
[Throw]if the document is not fully active. (Make History attributes and methods throw #16697)
Spec: https://html.spec.whatwg.org/multipage/browsers.html#the-history-interface
Task Source and Events
- Fully implement
HistoryTraversalTaskSource(Fully implement HistoryTravesalTaskSource #10994) -
PopStateEvent(Implement navigation events #11005 Implement navigation events #11006) -
HashChangeEvent(Implement navigation events #11005 Implement navigation events #11006) -
PageTransitionEvent(Implement navigation events #11005 Implement navigation events #11006)
Specs:
https://html.spec.whatwg.org/multipage/webappapis.html#history-traversal-task-source
https://html.spec.whatwg.org/multipage/browsers.html#the-popstateevent-interface
https://html.spec.whatwg.org/multipage/browsers.html#hashchangeevent
https://html.spec.whatwg.org/multipage/browsers.html#pagetransitionevent
Browsing Context (Edit: Now WindowProxy)
- Replace
PagewithBrowsingContext(Replace Page with BrowsingContext #11031 Combine Page into BrowsingContext #11044)
History State
- Create a
StateIdtype to refer to the associated JS state for a session history entry. Serialized history states should be stored in a resource thread and freed when no longer accessible. Once a state becomes activated, it must be deserialized and stored by theHistoryobject. (Implement History State #20638)
Constellation
- Setup a
joint session historythat has all of the session history entries interleaved by the time they were created (https://github.com/ConnorGBrewster/ServoNavigation) (Implement joint session history #11866) - Add delta to
NavigationDirection(Add support for navigating by a delta #11616) - Allow multiple session history entries to share the same pipeline id.
URLs and Hash Change
- History state diffs should track URL changes
- Scrolling to fragment should trigger a hash change event and add a new diff in the session history
- Hash change events should be fired when the hash changes during a history traversal.
Scroll Restoration
- Save scroll offset in session history and restore the scroll location on navigation depending on the value of
ScrollRestoration
Testing
- Add more tests for the History API that test many edge cases not checked by the current suite. (https://github.com/cbrewster/ServoNavigation)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-constellationInvolves the constellationInvolves the constellationA-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentB-metaThis issue tracks the status of multiple, related pieces of workThis issue tracks the status of multiple, related pieces of work