url module

Functions

isSupported()

Checks if dialog.url module is supported by the host

open(UrlDialogInfo, DialogSubmitHandler, PostMessageChannel)

Allows app to open a url based dialog.

submit(string | object, string | string[])

Submit the dialog module and close the dialog

Function Details

isSupported()

Checks if dialog.url module is supported by the host

function isSupported(): boolean

Returns

boolean

boolean to represent whether dialog.url module is supported

open(UrlDialogInfo, DialogSubmitHandler, PostMessageChannel)

Allows app to open a url based dialog.

function open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel)

Parameters

urlDialogInfo
UrlDialogInfo

An object containing the parameters of the dialog module.

submitHandler
DialogSubmitHandler

Handler that triggers when a dialog calls the submit(string | object, string | string[]) function or when the user closes the dialog.

messageFromChildHandler
PostMessageChannel

Handler that triggers if dialog sends a message to the app.

Remarks

This function cannot be called from inside of a dialog

submit(string | object, string | string[])

Submit the dialog module and close the dialog

function submit(result?: string | object, appIds?: string | string[])

Parameters

result

string | object

The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it, If this function is called from a dialog while M365ContentAction is set in the context object by the host, result will be ignored

appIds

string | string[]

Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.

Remarks

This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.