### Get Runtime Feature Flags Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Retrieves the current state of the runtime feature flags. ```TypeScript function getCurrentFeatureFlagsState(): RuntimeFeatureFlags ``` -------------------------------- ### Get Adaptive Card Schema Version Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Retrieves the current Adaptive Card schema version. ```TypeScript function getAdaptiveCardSchemaVersion(): AdaptiveCardVersion | undefined ``` -------------------------------- ### Retrieve Context (Deprecated) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Use this method to get the current frame context. This API is deprecated in favor of app.getContext(). ```TypeScript function getContext(callback: getContextCallbackFunctionType) ``` -------------------------------- ### initialize(callback, validMessageOrigins) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Initializes the library. This API is deprecated; use app.initialize() instead. ```APIDOC ## initialize(callback, validMessageOrigins) ### Description Initializes the library. This must be called before any other SDK calls but after the frame is loaded successfully. This API is deprecated; use app.initialize() instead. ### Parameters - **callback** (callbackFunctionType) - Optional - Callback to invoke when Teams SDK has successfully initialized. - **validMessageOrigins** (string[]) - Optional - List of cross-frame message origins. ``` -------------------------------- ### Initialize SDK (Deprecated) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Initializes the library before other SDK calls. Superseded by app.initialize(). ```TypeScript function initialize(callback?: callbackFunctionType, validMessageOrigins?: string[]) ``` -------------------------------- ### initializeWithFrameContext(frameContext, callback, validMessageOrigins) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Initialize with FrameContext. This API is deprecated; use pages.initializeWithFrameContext() instead. ```APIDOC ## initializeWithFrameContext(frameContext, callback, validMessageOrigins) ### Description Initialize with FrameContext. This API is deprecated; use pages.initializeWithFrameContext() instead. ### Parameters - **frameContext** (FrameInfo) - Required - FrameContext information to be set. - **callback** (callbackFunctionType) - Optional - Callback to be invoked after initializing the frame context. - **validMessageOrigins** (string[]) - Optional - List of cross-frame message origins. ``` -------------------------------- ### Initialize with Frame Context (Deprecated) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Initializes the library with specific frame context. Superseded by pages.initializeWithFrameContext(). ```TypeScript function initializeWithFrameContext(frameContext: FrameInfo, callback?: callbackFunctionType, validMessageOrigins?: string[]) ``` -------------------------------- ### Upload Custom App Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Uploads a custom app manifest blob with an optional completion callback. ```TypeScript function uploadCustomApp(manifestBlob: Blob, onComplete?: (status: boolean, reason?: string) => void) ``` -------------------------------- ### uploadCustomApp Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Uploads a custom app manifest. ```APIDOC ## uploadCustomApp(manifestBlob, onComplete) ### Description Uploads a custom app manifest. ### Parameters - **manifestBlob** (Blob) - Required - The manifest blob to upload. - **onComplete** ((status: boolean, reason?: string) => void) - Optional - Callback function invoked upon completion. ``` -------------------------------- ### navigateBack(onComplete) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Navigates back in the Teams client. This API is deprecated; use pages.backStack.navigateBack() instead. ```APIDOC ## navigateBack(onComplete) ### Description Navigates back in the Teams client. This API is deprecated; use pages.backStack.navigateBack() instead. ### Parameters - **onComplete** (onCompleteHandlerFunctionType) - Optional - Handler to be invoked when navigation is complete. ``` -------------------------------- ### Navigate Cross Domain Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Deprecated API. Use window.location.href for cross-domain navigation instead. ```TypeScript function navigateCrossDomain(url: string, onComplete?: onCompleteHandlerFunctionType) ``` -------------------------------- ### Navigate to Tab Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Deprecated API. Use pages.tabs.navigateToTab instead. ```TypeScript function navigateToTab(tabInstance: TabInstance, onComplete?: onCompleteHandlerFunctionType) ``` -------------------------------- ### getContext(callback) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Retrieves the current context the frame is running in. This API is deprecated; use app.getContext() instead. ```APIDOC ## getContext(callback) ### Description Retrieves the current context the frame is running in. This API is deprecated; use app.getContext() instead. ### Parameters - **callback** (getContextCallbackFunctionType) - Required - The callback to invoke when the Context object is retrieved. ``` -------------------------------- ### returnFocus Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Returns focus to the main Teams app. Note: This API is deprecated. ```APIDOC ## returnFocus(navigateForward) ### Description Return focus to the main Teams app. Will focus search bar if navigating forward and app bar if navigating back. ### Parameters - **navigateForward** (boolean) - Optional - Determines the direction to focus in the teams app. ``` -------------------------------- ### enablePrintCapability() Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Enables print capability to support printing the page using keyboard shortcuts. Note: This API is deprecated. ```APIDOC ## enablePrintCapability() ### Description Enable print capability to support printing page using Ctrl+P and cmd+P. As of TeamsJS v2.0.0, please use teamsCore.enablePrintCapability() instead. ### Signature `function enablePrintCapability()` ``` -------------------------------- ### Register Change Settings Handler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Deprecated API. Use pages.config.registerChangeConfigHandler instead. ```TypeScript function registerChangeSettingsHandler(handler: callbackFunctionType) ``` -------------------------------- ### Print Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Deprecated API. Use teamsCore.print() instead. ```TypeScript function print() ``` -------------------------------- ### getMruTabInstances(callback, tabInstanceParameters) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Allows an app to retrieve the most recently used tabs for this user. This API is deprecated; use pages.tabs.getMruTabInstances() instead. ```APIDOC ## getMruTabInstances(callback, tabInstanceParameters) ### Description Allows an app to retrieve the most recently used tabs for this user. This API is deprecated; use pages.tabs.getMruTabInstances() instead. ### Parameters - **callback** (getTabInstancesCallbackFunctionType) - Required - The callback to invoke when the TabInformation object is retrieved. - **tabInstanceParameters** (TabInstanceParameters) - Optional - Ignored, kept for future use. ``` -------------------------------- ### navigateCrossDomain(string, onCompleteHandlerFunctionType) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Navigates the frame to a new cross-domain URL. This API is deprecated as of 2.0.0. ```APIDOC ## navigateCrossDomain(string, onCompleteHandlerFunctionType) ### Description Navigates the frame to a new cross-domain URL. This API is deprecated as of 2.0.0; use window.location.href instead. ### Parameters - **url** (string) - Required - The URL to navigate the frame to. - **onComplete** (onCompleteHandlerFunctionType) - Optional - The callback to invoke when the action is complete. ``` -------------------------------- ### Navigate Back (Deprecated) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Navigates back in the Teams client. Superseded by pages.backStack.navigateBack(). ```TypeScript function navigateBack(onComplete?: onCompleteHandlerFunctionType) ``` -------------------------------- ### Register App Button Hover Enter Handler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Deprecated API. Use pages.appButton.onHoverEnter instead. ```TypeScript function registerAppButtonHoverEnterHandler(handler: callbackFunctionType) ``` -------------------------------- ### Check FrameContexts for App Behavior Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Use FrameContexts to determine the current environment and adapt the app's UI or logic accordingly. ```typescript If your app is running in the "settings" context, you should be displaying your apps configuration page. If the app is running in the content context, the developer may want to display information relevant to the content the user is currently viewing. ``` -------------------------------- ### getTabInstances(callback, tabInstanceParameters) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Allows an app to retrieve tabs owned by the app for the user. This API is deprecated; use pages.tabs.getTabInstances() instead. ```APIDOC ## getTabInstances(callback, tabInstanceParameters) ### Description Allows an app to retrieve tabs owned by the app for the user. This API is deprecated; use pages.tabs.getTabInstances() instead. ### Parameters - **callback** (getTabInstancesCallbackFunctionType) - Required - The callback to invoke when the TabInstanceParameters object is retrieved. - **tabInstanceParameters** (TabInstanceParameters) - Optional - Flags that specify whether to scope call to favorite teams or channels. ``` -------------------------------- ### registerFullScreenHandler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Registers a handler for changes from or to full-screen view for a tab. Note: This API is deprecated. ```APIDOC ## registerFullScreenHandler(handler) ### Description Registers a handler for changes from or to full-screen view for a tab. Only one handler can be registered at a time. ### Parameters - **handler** (registerFullScreenHandlerFunctionType) - Required - The handler to invoke when the user toggles full-screen view for a tab. ``` -------------------------------- ### Return Focus to Teams Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Returns focus to the main Teams app. This API is deprecated; use pages.returnFocus instead. ```TypeScript function returnFocus(navigateForward?: boolean) ``` -------------------------------- ### print() Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Default print handler. This API is deprecated as of 2.0.0. ```APIDOC ## print() ### Description Default print handler. This API is deprecated as of 2.0.0; use teamsCore.print() instead. ``` -------------------------------- ### getCurrentFeatureFlagsState() Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Returns the current state of the runtime feature flags. ```APIDOC ## getCurrentFeatureFlagsState() ### Description Returns the current state of the runtime feature flags. ### Returns - **RuntimeFeatureFlags** - The current state of the runtime feature flags. ``` -------------------------------- ### Register App Button Click Handler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Deprecated API. Use pages.appButton.onClick instead. ```TypeScript function registerAppButtonClickHandler(handler: callbackFunctionType) ``` -------------------------------- ### Register App Button Hover Leave Handler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Deprecated API. Use pages.appButton.onHoverLeave instead. ```TypeScript function registerAppButtonHoverLeaveHandler(handler: callbackFunctionType) ``` -------------------------------- ### Enable Print Capability Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Enables print capability for the application. This API is deprecated; use teamsCore.enablePrintCapability() instead. ```TypeScript function enablePrintCapability() ``` -------------------------------- ### Execute Deep Link Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Opens various types of links. This API is deprecated; use specific navigation functions like navigateToDefaultPage or openLink instead. ```TypeScript function executeDeepLink(deepLink: string, onComplete?: executeDeepLinkOnCompleteFunctionType) ``` -------------------------------- ### executeDeepLink(string, executeDeepLinkOnCompleteFunctionType) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Used for opening various types of links. Note: This API is deprecated. ```APIDOC ## executeDeepLink(string, executeDeepLinkOnCompleteFunctionType) ### Description This function was previously used for opening various types of links. It has been replaced with multiple different functions depending on the type of link. ### Signature `function executeDeepLink(deepLink: string, onComplete?: executeDeepLinkOnCompleteFunctionType)` ### Parameters - **deepLink** (string) - The deep link to navigate to. - **onComplete** (executeDeepLinkOnCompleteFunctionType) - Optional callback function. ``` -------------------------------- ### activateChildProxyingCommunication() Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Enables child proxying communication for applications that require it. Note: This API is deprecated and considered insecure. ```APIDOC ## activateChildProxyingCommunication() ### Description Enables child proxying communication for apps that still need it. This API is deprecated and will be removed in future releases. ### Signature `function activateChildProxyingCommunication()` ``` -------------------------------- ### navigateToTab(TabInstance, onCompleteHandlerFunctionType) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Navigates the Microsoft Teams app to the specified tab instance. This API is deprecated as of 2.0.0. ```APIDOC ## navigateToTab(TabInstance, onCompleteHandlerFunctionType) ### Description Navigates the Microsoft Teams app to the specified tab instance. This API is deprecated as of 2.0.0; use pages.tabs.navigateToTab instead. ### Parameters - **tabInstance** (TabInstance) - Required - The tab instance to navigate to. - **onComplete** (onCompleteHandlerFunctionType) - Optional - The callback to invoke when the action is complete. ``` -------------------------------- ### getAdaptiveCardSchemaVersion() Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Retrieves the current Adaptive Card schema version. ```APIDOC ## getAdaptiveCardSchemaVersion() ### Description Returns the current Adaptive Card schema version supported by the host. ### Signature `function getAdaptiveCardSchemaVersion(): AdaptiveCardVersion | undefined` ``` -------------------------------- ### Register Back Button Handler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Deprecated API. Use pages.backStack.registerBackButtonHandler instead. ```TypeScript function registerBackButtonHandler(handler: registerBackButtonHandlerFunctionType) ``` -------------------------------- ### Register Theme Change Handler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Registers a handler for theme changes. This API is deprecated; use app.registerOnThemeChangeHandler instead. ```TypeScript function registerOnThemeChangeHandler(handler: registerOnThemeChangeHandlerFunctionType) ``` -------------------------------- ### registerChangeSettingsHandler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Registers a handler to be invoked when the user clicks on Settings. ```APIDOC ## registerChangeSettingsHandler(handler) ### Description Registers a handler to be invoked when the user clicks on Settings. ### Parameters - **handler** (callbackFunctionType) - Required - The handler to invoke when the user clicks on Settings. ``` -------------------------------- ### Register Full-Screen Handler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Registers a handler for full-screen view toggles. This API is deprecated; use pages.registerFullScreenHandler instead. ```TypeScript function registerFullScreenHandler(handler: registerFullScreenHandlerFunctionType) ``` -------------------------------- ### setFrameContext Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Sets the current Frame Context. Note: This API is deprecated. ```APIDOC ## setFrameContext(frameContext) ### Description Set the current Frame Context. ### Parameters - **frameContext** (FrameInfo) - Required - FrameContext information to be set. ``` -------------------------------- ### registerOnThemeChangeHandler Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Registers a handler for theme changes. Note: This API is deprecated. ```APIDOC ## registerOnThemeChangeHandler(handler) ### Description Registers a handler for theme changes. Only one handler can be registered at a time. ### Parameters - **handler** (registerOnThemeChangeHandlerFunctionType) - Required - The handler to invoke when the user changes their theme. ``` -------------------------------- ### setFeatureFlagsState Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Sets the runtime feature flags to the new feature flags provided. ```APIDOC ## setFeatureFlagsState(featureFlags) ### Description Sets the runtime feature flags to the new feature flags provided. ### Parameters - **featureFlags** (RuntimeFeatureFlags) - Required - The new feature flags to set. ``` -------------------------------- ### Activate Child Proxying Communication Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Enables child proxying communication. This API is deprecated and considered insecure. ```TypeScript function activateChildProxyingCommunication() ``` -------------------------------- ### Set Runtime Feature Flags Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Updates the runtime feature flags to the provided state. ```TypeScript function setFeatureFlagsState(featureFlags: RuntimeFeatureFlags) ``` -------------------------------- ### registerAppButtonClickHandler(callbackFunctionType) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Registers a handler for clicking the app button. This API is deprecated as of 2.0.0. ```APIDOC ## registerAppButtonClickHandler(callbackFunctionType) ### Description Registers a handler for clicking the app button. Only one handler can be registered at a time. This API is deprecated as of 2.0.0; use pages.appButton.onClick instead. ### Parameters - **handler** (callbackFunctionType) - Required - The handler to invoke when the personal app button is clicked. ``` -------------------------------- ### Retrieve App-Owned Tabs (Deprecated) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Retrieves tabs owned by the app. Superseded by pages.tabs.getTabInstances(). ```TypeScript function getTabInstances(callback: getTabInstancesCallbackFunctionType, tabInstanceParameters?: TabInstanceParameters) ``` -------------------------------- ### shareDeepLink Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Shares a deep link that a user can use to navigate back to a specific state in this page. Note: This API is deprecated. ```APIDOC ## shareDeepLink(deepLinkParameters) ### Description Shares a deep link that a user can use to navigate back to a specific state in this page. ### Parameters - **deepLinkParameters** (DeepLinkParameters) - Required - ID and label for the link and fallback URL. ``` -------------------------------- ### Set Frame Context Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Sets the current frame context. This API is deprecated; use pages.setCurrentFrame instead. ```TypeScript function setFrameContext(frameContext: FrameInfo) ``` -------------------------------- ### Retrieve Recently Used Tabs (Deprecated) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Retrieves the most recently used tabs for the user. Superseded by pages.tabs.getMruTabInstances(). ```TypeScript function getMruTabInstances(callback: getTabInstancesCallbackFunctionType, tabInstanceParameters?: TabInstanceParameters) ``` -------------------------------- ### Share Deep Link Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Shares a deep link for navigating to a specific page state. This API is deprecated; use pages.shareDeepLink instead. ```TypeScript function shareDeepLink(deepLinkParameters: DeepLinkParameters) ``` -------------------------------- ### overwriteFeatureFlagsState(Partial) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Overwrites all the feature flags in the runtime feature flags object with the new feature flags provided. ```APIDOC ## overwriteFeatureFlagsState(Partial) ### Description Overwrites all the feature flags in the runtime feature flags object with the new feature flags provided. ### Parameters - **newFeatureFlags** (Partial) - Required - The new feature flags to set. ### Returns - **RuntimeFeatureFlags** - The current state of the runtime feature flags. ``` -------------------------------- ### registerBackButtonHandler(registerBackButtonHandlerFunctionType) Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Registers a handler for user presses of the Team client's back button. This API is deprecated as of 2.0.0. ```APIDOC ## registerBackButtonHandler(registerBackButtonHandlerFunctionType) ### Description Registers a handler for user presses of the Team client's back button. This API is deprecated as of 2.0.0; use pages.backStack.registerBackButtonHandler instead. ### Parameters - **handler** (registerBackButtonHandlerFunctionType) - Required - The handler to invoke when the user presses the back button. ``` -------------------------------- ### Overwrite Feature Flags State Source: https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/?view=msteams-client-js-latest Overwrites all runtime feature flags with the provided new flags. ```TypeScript function overwriteFeatureFlagsState(newFeatureFlags: Partial): RuntimeFeatureFlags ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.