有什么方法不支持有关Outlook Office加载项的IE11吗?

问题描述

当前,我们正在开发Microsoft Outlook Office加载项。尽管我们几乎完成了实施阶段,但被应用审查阶段拒绝了。根据审阅者的反馈,当用户利用Web上的Outlook并在Internet Explorer 11(IE11)上打开我们的加载项时,它运行不正常。(在浏览器控制台上发生异常)但是,由于该异常不会在Chrome,Edge和Safari上发生,我想从支持的浏览器中明确删除IE11(并通过应用审查)。

问题:有什么方法不支持IE11?

解决方法

遵循以下原则:

// `document.documentMode` is a number in IE 5+
// and `undefined` in all other browsers
var isIe = !!document.documentMode

if (isIe) {
  // replace with whatever logic you want to implement for IE users
  document.body.textContent = 'Sorry,IE not supported'
} else {
  // replace with logic for non-IE users
  app.init()
}