以 Office.js 为目标的 Web 浏览器版本

Web browser versions to target with Office.js

使用 Office.js、Windows 上的 Internet Explorer 版本中的 Office 加载项 运行、Mac/iOS 上的 WebKit 以及 Office 支持的任何浏览器365. 我假设 Internet Explorer 在与现代 Web API 的兼容性方面将成为短板。

使用 Office.js 开发外接程序时,应以哪个版本的 Internet Explorer 为目标并为缺少的功能(例如 fetch 等)提供 polyfill? Office.js 是否为 Promise 提供了 polyfill?

dev.office.com 文档没有我可以在这些页面上找到的指南:

出于所有实际目的,您应该能够假设 IE11。并使用像 modernizr 这样的东西来验证你关心的特性(或者只是做一个笼统的声明,如果它是 IE,它应该 >= IE 11)。有人正在使用 IE9/10 的可能性为 1%(或更少?),您可能会收到一条消息,提示用户升级 his/her IE 安装。

Office.js(针对 Excel/Word 的较新版本时)确实在 OfficeExtension.Promise 下包含一个 Promise polyfill(如果您愿意,可以将其分配给 window.Promise ).但另一方面,您可能只想使用您更能控制的真正的全局 Promise polyfill(例如,core.js 附带的 Promise)。

Office add-ins 的主要概念是 "works everywhere where office runs"。仍在开发中以满足此概念,但那里的想法是查看 Office 365 的要求集,而不是参考 add-ins 要求的细节。例如,“Which Browsers Work With Office Online" describes Internet Explorer 11 as recommended minimum version for Windows platform. You may find similar recommendations for browsers 产品的整个 Office 系列。此文档中关于 IE 的引用:

Internet Explorer:Office 365 is designed to work with Internet Explorer 11. We recommend that you upgrade to Internet Explorer 11, if you are using an earlier version. Office 365 might continue to work with versions of Internet Explorer other than Internet Explorer 11, but Office 365 can’t provide any guarantees.