我尝试使用BrowserstackmxClient.isBrowserSupported()
在 MS Edge 12 和 13 中运行
结果是它false
在 MS Edge 12 中返回,但true
在 MS Edge 13 中返回。
我对代码进行了更深入的挖掘,他们有这些片段。
IS_SVG: navigator.userAgent.indexOf('Firefox/') >= 0 || // FF and Camino
navigator.userAgent.indexOf('Iceweasel/') >= 0 || // Firefox on Debian
navigator.userAgent.indexOf('Seamonkey/') >= 0 || // Firefox-based
navigator.userAgent.indexOf('Iceape/') >= 0 || // Seamonkey on Debian
navigator.userAgent.indexOf('Galeon/') >= 0 || // Gnome Browser (old)
navigator.userAgent.indexOf('Epiphany/') >= 0 || // Gnome Browser (new)
navigator.userAgent.indexOf('AppleWebKit/') >= 0 || // Safari/Google Chrome
navigator.userAgent.indexOf('Gecko/') >= 0 || // Netscape/Gecko
navigator.userAgent.indexOf('Opera/') >= 0 || // Opera
(document.documentMode != null && document.documentMode >= 9), // IE9+
我尝试在 MS Edge 12 和 13 中输出 navigator.userAgent
微软边缘 12
Mozilla/5.0 (Windows NT 10.0; Win64, x64)
微软边缘 13
Mozilla/5.0 (Windows NT 10.0; Win64, x64) AppleWebkit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
我不知道为什么 MS Edge 12 的用户代理不同。是因为我使用的是Browserstack吗?