pages module
Navigation-specific part of the SDK.
Interfaces
InstanceConfig |
Defines the configuration of the current or desired instance |
NavigateToAppParams |
Parameters for the NavigateToApp API |
Type Aliases
backButtonHandlerFunctionType |
Back button handler function |
fullScreenChangeFunctionType |
Full screen function |
handlerFunctionType |
Callback function |
removeEventType |
Remove event function |
saveEventType |
Save event function |
Functions
get |
Gets the config for the current instance. |
initialize |
Initializes the library with context information for the frame |
is |
Checks if the pages capability is supported by the host |
navigate |
Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the valid domains specified in the validDomains block of the manifest; otherwise, an exception will be thrown. This function needs to be used only when navigating the frame to a URL in a different domain than the current one in a way that keeps the application informed of the change and allows the SDK to continue working. |
navigate |
Used to navigate to apps other than your own. If you are looking to navigate within your own app, use navigateToDefaultPage or navigateTo |
register |
Registers a handler for changes from or to full-screen view for a tab. Only one handler can be registered at a time. A subsequent registration replaces an existing registration. On hosts where there is no support for making an app full screen, the handler registered with this function will never be called. |
return |
Return focus to the host. Will move focus forward or backward based on where the application container falls in the F6/tab order in the host. On mobile hosts or hosts where there is no keyboard interaction or UI notion of "focus" this function has no effect and will be a no-op when called. |
set |
Sets/Updates the current frame with new information |
share |
Shares a deep link that a user can use to navigate back to a specific state in this page. Please note that this method does not yet work on mobile hosts. |
Function Details
getConfig()
Gets the config for the current instance.
function getConfig(): Promise<InstanceConfig>
Returns
Promise<InstanceConfig>
Promise that resolves with the InstanceConfig object.
initializeWithFrameContext(FrameInfo, handlerFunctionType, string[])
Initializes the library with context information for the frame
function initializeWithFrameContext(frameInfo: FrameInfo, callback?: handlerFunctionType, validMessageOrigins?: string[])
Parameters
- frameInfo
- FrameInfo
Frame information containing the URL used in the iframe on reload and the URL for when the user clicks 'Go To Website'
- callback
- handlerFunctionType
An optional callback that is executed once the application has finished initialization.
- validMessageOrigins
-
string[]
An optional list of cross-frame message origins. They must have https: protocol otherwise they will be ignored. Example: https:www.example.com
isSupported()
Checks if the pages capability is supported by the host
function isSupported(): boolean
Returns
boolean
boolean to represent whether the appEntity capability is supported
navigateCrossDomain(string)
Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the valid domains specified in the validDomains block of the manifest; otherwise, an exception will be thrown. This function needs to be used only when navigating the frame to a URL in a different domain than the current one in a way that keeps the application informed of the change and allows the SDK to continue working.
function navigateCrossDomain(url: string): Promise<void>
Parameters
- url
-
string
The URL to navigate the frame to.
Returns
Promise<void>
Promise that resolves when the navigation has completed.
navigateToApp(NavigateToAppParams)
Used to navigate to apps other than your own.
If you are looking to navigate within your own app, use navigateToDefaultPage or navigateTo
function navigateToApp(params: NavigateToAppParams): Promise<void>
Parameters
- params
- NavigateToAppParams
Parameters for the navigation
Returns
Promise<void>
a Promise
that will resolve if the navigation was successful or reject if it was not
registerFullScreenHandler(fullScreenChangeFunctionType)
Registers a handler for changes from or to full-screen view for a tab. Only one handler can be registered at a time. A subsequent registration replaces an existing registration. On hosts where there is no support for making an app full screen, the handler registered with this function will never be called.
function registerFullScreenHandler(handler: fullScreenChangeFunctionType)
Parameters
- handler
- fullScreenChangeFunctionType
The handler to invoke when the user toggles full-screen view for a tab.
returnFocus(boolean)
Return focus to the host. Will move focus forward or backward based on where the application container falls in the F6/tab order in the host. On mobile hosts or hosts where there is no keyboard interaction or UI notion of "focus" this function has no effect and will be a no-op when called.
function returnFocus(navigateForward?: boolean)
Parameters
- navigateForward
-
boolean
Determines the direction to focus in host.
setCurrentFrame(FrameInfo)
Sets/Updates the current frame with new information
function setCurrentFrame(frameInfo: FrameInfo)
Parameters
- frameInfo
- FrameInfo
Frame information containing the URL used in the iframe on reload and the URL for when the user clicks 'Go To Website'
shareDeepLink(ShareDeepLinkParameters)
Shares a deep link that a user can use to navigate back to a specific state in this page. Please note that this method does not yet work on mobile hosts.
function shareDeepLink(deepLinkParameters: ShareDeepLinkParameters)
Parameters
- deepLinkParameters
- ShareDeepLinkParameters
ID and label for the link and fallback URL.
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für