backStack module

Provides APIs for handling the user's navigational history.

Functions

isSupported()

Checks if the pages.backStack capability is supported by the host

navigateBack()

Navigates back in the hosted application. See registerBackButtonHandler for notes on usage.

registerBackButtonHandler(backButtonHandlerFunctionType)

Registers a handler for user presses of the host client's back button. Experiences that maintain an internal navigation stack should use this handler to navigate the user back within their frame. If an application finds that after running its back button handler it cannot handle the event it should call the navigateBack method to ask the host client to handle it instead.

Function Details

isSupported()

Checks if the pages.backStack capability is supported by the host

function isSupported(): boolean

Returns

boolean

boolean to represent whether the pages.backStack capability is supported

navigateBack()

Navigates back in the hosted application. See registerBackButtonHandler for notes on usage.

function navigateBack(): Promise<void>

Returns

Promise<void>

Promise that resolves when the navigation has completed.

registerBackButtonHandler(backButtonHandlerFunctionType)

Registers a handler for user presses of the host client's back button. Experiences that maintain an internal navigation stack should use this handler to navigate the user back within their frame. If an application finds that after running its back button handler it cannot handle the event it should call the navigateBack method to ask the host client to handle it instead.

function registerBackButtonHandler(handler: backButtonHandlerFunctionType)

Parameters

handler
backButtonHandlerFunctionType

The handler to invoke when the user presses the host client's back button.