如何在 outlook 加载项中使用 displayDialogAsync(startAddress, options, callback) API 在对话框中显示 google 页面
how to show google page in dialog using displayDialogAsync(startAddress, options, callback) API in outlook add-in
当我使用以下代码从 outlook 加载项打开 google 页面时,它会在默认浏览器中打开,而不是在对话框中打开。
Office.context.ui.displayDialogAsync('https://www.ggogle.com', {height: 30, width: 20, displayInIframe: true},
function (asyncResult) {
dialog = asyncResult.value;
dialog.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogMessageReceived, receiveMessage);
dialog.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogEventReceived, dialogClosed);
//event.completed({allowEvent: true})
}
);
如何在对话框中打开它
如果 url 您正在打开 (https://google.com) is not defined in the AppDomain element in the manifest, it will open in the default browser. To open in a display dialog, add the url to the AppDomains element.
当我使用以下代码从 outlook 加载项打开 google 页面时,它会在默认浏览器中打开,而不是在对话框中打开。
Office.context.ui.displayDialogAsync('https://www.ggogle.com', {height: 30, width: 20, displayInIframe: true},
function (asyncResult) {
dialog = asyncResult.value;
dialog.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogMessageReceived, receiveMessage);
dialog.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogEventReceived, dialogClosed);
//event.completed({allowEvent: true})
}
);
如何在对话框中打开它
如果 url 您正在打开 (https://google.com) is not defined in the AppDomain element in the manifest, it will open in the default browser. To open in a display dialog, add the url to the AppDomains element.