getCurrentBrowserTabContext

This method returns the current browser tabContext in the application if no optional parameter is passed. This method is exposed over UefFrameworkProvider object.

Note: This API returns the browser tabContext from which the MCA floating toolbar window is opened, if its called from MCA toolbar window.

Here's the syntax:

getCurrentBrowserTabContext(browserTabId?: string): Promise<ITabContext>;
Note: The current browser TabContext list will be returned if the browser TabId isn't passed.
Parameter Required Description
browserTabId No TabId for the browser where the application is loaded.

Here's a TypeScript example of the getCurrentBrowserTabContext.

const frameworkProvider: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID','V1'); 
const tabContext: ITabContext = await frameworkProvider.getCurrentBrowserTabContext();

Here's a JavaScript example the getCurrentBrowserTabContext.

const frameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID','V1');
const tabContext = await frameworkProvider.getCurrentBrowserTabContext();