Class: PageNavigationHandler
@ima/core.PageNavigationHandler
Hierarchy
↳
PageNavigationHandler
Constructors
constructor
• new PageNavigationHandler(window
)
Parameters
Name | Type | Description |
---|---|---|
window | Window | The utility for manipulating the global context and global client-side-specific APIs. |
Overrides
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:18
Properties
#preManaged
• Private
#preManaged: boolean
= false
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:10
_window
• Protected
_window: Window
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:8
$dependencies
▪ Static
$dependencies: Dependencies
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:12
Methods
_saveScrollHistory
▸ _saveScrollHistory(): void
Save user's scroll state to history.
Replace scroll values in current state for actual scroll values in document.
Returns
void
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:104
_scrollTo
▸ _scrollTo(«destructured»
): void
Scrolls to give coordinates on a page.
Parameters
Name | Type |
---|---|
«destructured» | Object |
Returns
void
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:121
_setAddressBar
▸ _setAddressBar(url
, isRedirection
): void
Sets the provided URL to the browser's address bar by pushing or replacing a new state to the history.
The state object pushed to or replaced in the history will be an object with the
following structure: {url: string}
. The url
field will
be set to the provided URL.
Parameters
Name | Type | Description |
---|---|---|
url | string | The URL. |
isRedirection | boolean | If replaceState should be used instead of pushState. |
Returns
void
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:138
destroy
▸ destroy(): void
Finalization callback, called when the page manager is being discarded. This usually happens when the page is hot-reloaded at the client side.
Returns
void
Inherited from
Defined in
packages/core/src/page/handler/PageHandler.ts:50
handlePostManagedState
▸ handlePostManagedState(managedPage
, previousManagedPage
, action
): void
Called after a PageManager finishes transition from previous page to a new one.
Parameters
Name | Type | Description |
---|---|---|
managedPage | ManagedPage | The currently managed page. |
previousManagedPage | ManagedPage | The data of the page that was previously managed. |
action | PageAction | An action object describing what triggered the routing. |
Returns
void
Overrides
PageHandler.handlePostManagedState
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:84
handlePreManagedState
▸ handlePreManagedState(managedPage
, nextManagedPage
, action
): void
Called before a PageManager starts to transition from previous page to a new one.
Parameters
Name | Type | Description |
---|---|---|
managedPage | ManagedPage | The currently managed page - soon-to-be previously managed page. |
nextManagedPage | ManagedPage | The data of the page that's about to be managed. |
action | PageAction | An action object describing what triggered the routing. |
Returns
void
Overrides
PageHandler.handlePreManagedState
Defined in
packages/core/src/page/handler/PageNavigationHandler.ts:43
init
▸ init(): void
Initializes the page handler.
Returns
void