简体   繁体   English

Office365胖客户端中使用的DOM和JavaScript引擎

[英]DOM and JavaScript Engine used in Office365 Thick Clients

The product I work on offers SSO into Office365, through both the web and native, "thick" clients aka rich clients. 我从事的产品通过Web和本机“胖”客户端(也称为富客户端)将SSO引入Office365。 Part of SSO-ing into an Office365 app, such as Excel for example, involves displaying my product's login page inside of the login popup window inside the thick client. SSO进入Office365应用程序(例如Excel)的一部分涉及在胖客户端内部的登录弹出窗口内显示我产品的登录页面。 The problem is, only on Windows, I get many JavaScript errors when trying to execute the JavaScript included in our login page (it happens to be using AngularJS, but I suspect many frameworks/libraries would be incompatible). 问题是,仅在Windows上,尝试执行登录页面中包含的JavaScript时,我会遇到许多JavaScript错误(它恰巧是使用AngularJS,但我怀疑许多框架/库都不兼容)。 It appears that console is not supported, along with document.body , and many other "essentials". 似乎不支持console以及document.body和许多其他“必需项”。

Does anyone have any knowledge of the DOM and script engines that are used here? 有谁知道这里使用的DOM和脚本引擎吗? The first page shown in the SSO flow is Microsoft's login page where you enter your email address, which then redirects to my product's login page (mapped by domain on the email address), and their page seems to render fine, so clearly it's possible to get HTML and JS to work nice (enough). SSO流程中显示的第一页是Microsoft的登录页面,您在其中输入您的电子邮件地址,然后重定向到我产品的登录页面(按电子邮件地址上的域进行映射),并且它们的页面似乎可以正常显示,因此很可能可以使HTML和JS正常工作(足够)。 I'd also take a recommendation on any kind of shim/polyfill that would help me get moving, as well. 我也会对任何一种能够帮助我移动的垫片/填充胶提出建议。

After doing some more digging, it looks like I was able to solve my problem by specifying an HTTP Response header of name X-UA-Compatible with value IE=edge , which tells IE to render using the latest document standards. 经过更多的挖掘之后,看来我能够通过指定名称为X-UA-Compatible的HTTP Response标头(值IE=edge来解决我的问题,该标头告诉IE使用最新的文档标准进行渲染。 It looked like the web view was originally trying to render using IE7 compatibility mode, which explains why none of my JS was working as intended. 好像Web视图最初试图使用IE7兼容模式进行渲染,这解释了为什么我的JS都无法按预期工作。

See https://stackoverflow.com/a/6771584/3822733 for more information on X-UA-Compatible , this is the question/answer that helped me solve this problem. 有关X-UA-Compatible更多信息,请参见https://stackoverflow.com/a/6771584/3822733 ,这是帮助我解决此问题的问题/答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM