Purpose
A controller to enable a link to navigate back 1 page using the user's browser history. Falls back to the href
of the link if there is no history available or the operation fails.
Value | Type | Description | Default |
---|
timeout | Number | The delay in ms before the controller should give up on history navigation and fall back to navigating to the link's href | 1500 |
pages | Number | The number of entries in the browser history to navigate back by | 1 |
Events
Event | When | Dispatched on | event.detail |
---|
- | - | - | - |
Side Effects
- Adds event listeners to the attached element for
click
- When a click occurs, if there is an
href
present on the link: sets a setTimeout
for timeoutValue
milliseconds so that if navigation fails, the page will instead navigate to the href
of the link.
How to Use