Constructor
new Manager()
Do not use constructor directly. This is a custom HTMLElement and should
be created using document.createElement
.
- Source:
Fires:
Classes
Members
(readonly) current :NavigationItem
Top most screen in the history stack.
- Source:
(readonly) previous :NavigationItem
Previous screen in the navigation stack, or null
- Source:
screenFactory :screenFactoryFunction
Callback responsible for populating screens given an id and state
- Source:
transition :ScreenTransition
Default transition that is used if no transition is provided by the Options
- Source:
Methods
back() → {Promise.<ScreenChange>}
Remove the current screen from the stack and show the one below it.
- Source:
getState() → {NavigatorState}
- Source:
push(id, state, optionsopt) → {Promise.<ScreenChange>}
Show a new screen, maintaining previous screens in the history stack.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string |
identifier passed to |
|
state |
object |
passed to |
|
options |
Options |
<optional> |
- Source:
replace(id, state, optionsopt) → {Promise.<ScreenChange>}
Replace the current screen with a new one. Leaves the rest of the history stack unchanged.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string |
identifier passed to |
|
state |
object |
passed to |
|
options |
Options |
<optional> |
- Source:
set(id, state, optionsopt) → {Promise.<ScreenChange>}
Replace the current screen, erasing the history stack.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string |
identifier passed to |
|
state |
object |
passed to |
|
options |
Options |
<optional> |
- Source:
setState(state) → {Promise.<Manager>}
Replace the current screen and history stack with the provided state
Parameters:
Name | Type | Description |
---|---|---|
state |
NavigatorState |
- Source:
Events
after-change :CustomEvent
Occurs after the transition to a new screen has completed.
Properties:
Name | Type | Description |
---|---|---|
details.to |
NavigationItem |
screen that is entering |
details.from |
NavigationItem |
screen that is leaving |
details.action |
Action |
action that caused this transition |
- Source:
before-change :CustomEvent
Occurs before the transition to a new screen. This is a cancelable event.
Properties:
Name | Type | Description |
---|---|---|
details.to |
NavigationItem |
screen that is entering |
details.from |
NavigationItem |
screen that is leaving |
details.action |
Action |
action that caused this transition |
- Source: