teamsCore module
Module containing the set of APIs that support Teams-specific functionalities.
Type Aliases
readyToUnloadFunctionType |
Ready to unload function type |
registerBeforeUnloadHandlerFunctionType |
Register before unload handler function type |
registerOnLoadHandlerFunctionType |
Register on load handler function type |
Functions
enable |
Enable print capability to support printing page using Ctrl+P and cmd+P |
is |
Checks if teamsCore capability is supported by the host |
print() | default print handler |
register |
Registers a handler to be called before the page is unloaded. |
register |
Registers a handler to be called when the page has been requested to load. |
Function Details
enablePrintCapability()
Enable print capability to support printing page using Ctrl+P and cmd+P
function enablePrintCapability()
isSupported()
Checks if teamsCore capability is supported by the host
function isSupported(): boolean
Returns
boolean
boolean to represent whether the teamsCore capability is supported
print()
default print handler
function print()
registerBeforeUnloadHandler(registerBeforeUnloadHandlerFunctionType)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Registers a handler to be called before the page is unloaded.
function registerBeforeUnloadHandler(handler: registerBeforeUnloadHandlerFunctionType)
Parameters
The handler to invoke before the page is unloaded. If this handler returns true the page should invoke the readyToUnload function provided to it once it's ready to be unloaded.
Remarks
Check out App Caching in Teams for a more detailed explanation about using this API.
registerOnLoadHandler(registerOnLoadHandlerFunctionType)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Registers a handler to be called when the page has been requested to load.
function registerOnLoadHandler(handler: registerOnLoadHandlerFunctionType)
Parameters
The handler to invoke when the page is loaded.
Remarks
Check out App Caching in Teams for a more detailed explanation about using this API.