sharing module

Module to open a share dialog for web content. For more info, see Share to Teams from personal app or tab

Interfaces

IShareRequest

Represents IShareRequest parameters interface.

IURLContent

Represents IURLContent parameters.

Type Aliases

IShareRequestContentType

IShareRequestContentType defines share request type.

shareWebContentCallbackFunctionType

shareWebContent callback function type

Functions

isSupported()

Checks if the sharing capability is supported by the host

shareWebContent(IShareRequest<IURLContent>)

Feature is under development Opens a share dialog for web content

shareWebContent(IShareRequest<IURLContent>, shareWebContentCallbackFunctionType)

Function Details

isSupported()

Checks if the sharing capability is supported by the host

function isSupported(): boolean

Returns

boolean

boolean to represent whether the sharing capability is supported

shareWebContent(IShareRequest<IURLContent>)

Feature is under development Opens a share dialog for web content

function shareWebContent(shareWebContentRequest: IShareRequest<IURLContent>): Promise<void>

Parameters

shareWebContentRequest

IShareRequest<IURLContent>

web content info

Returns

Promise<void>

Promise that will be fulfilled when the operation has completed

shareWebContent(IShareRequest<IURLContent>, shareWebContentCallbackFunctionType)

Warning

This API is now deprecated.

As of TeamsJS v2.0.0, please use sharing.shareWebContent(shareWebContentRequest: IShareRequest<IShareRequestContentType>): Promise<void> instead.

Feature is under development Opens a share dialog for web content

function shareWebContent(shareWebContentRequest: IShareRequest<IURLContent>, callback: shareWebContentCallbackFunctionType)

Parameters

shareWebContentRequest

IShareRequest<IURLContent>

web content info

callback
shareWebContentCallbackFunctionType

optional callback