Office js Office对话框API messageParent在Word的Edge中不起作用
如果我不复制_host_信息,我会在IE和Edge上弹出的对话框中看到“警告office.js在office客户端之外加载” 我正在使用中间人服务身份验证流。它在Firefox、Chrome和Word桌面客户端上运行良好,即使没有主机信息 当我复制_host_信息时,对话框在最后一次重定向回加载项时自动关闭 步骤:Office js Office对话框API messageParent在Word的Edge中不起作用,office-js,microsoft-edge,office-addins,Office Js,Microsoft Edge,Office Addins,如果我不复制_host_信息,我会在IE和Edge上弹出的对话框中看到“警告office.js在office客户端之外加载” 我正在使用中间人服务身份验证流。它在Firefox、Chrome和Word桌面客户端上运行良好,即使没有主机信息 当我复制_host_信息时,对话框在最后一次重定向回加载项时自动关闭 步骤: Trigger Office.context.ui.displayDialogAsync,带有查询重定向B64的加载项位置,其中包含指向mvc外部登录的url,并将uri重定向回加载
/* Render application after Office initializes */
Office.initialize = async () => {
let redirectUrl:string = window.atob(UrlHelper.getUrlParameter("redirectb64"));
if(redirectUrl !== "") {
console.log("DialogUrl",window.location);
console.log("Redirectb64 (atob)",redirectUrl);
//Must copy over this to the redirectUri;
let hostInfo:string = encodeURIComponent("&_host_Info=" + UrlHelper.getUrlParameter("_host_Info"));
redirectUrl = StringHelper.insert(redirectUrl.indexOf("&state="),redirectUrl,hostInfo);
console.log("Redirectb64 (atob) with hostInfo",redirectUrl);
window.location.href = redirectUrl;
return;
}
var response:AxiosResponse = await axios.get("assets/appconfig.json");
console.log("config loaded.", response.data);
AuthHelper.SetAccessToken();
//console.log("AuthHelper.SetAccessToken", typeof AuthHelper.SetAccessToken);
const myLanguage: string = Office.context.displayLanguage;
render(App,myLanguage, true, response.data);
};