backStack module
Provides APIs for handling the user's navigational history.
Functions
is |
Checks if the pages.backStack capability is supported by the host |
navigate |
Navigates back in the hosted application. See registerBackButtonHandler for notes on usage. |
register |
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.
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈