Update lib/ace/lib/useragent.js

Added detection for Internet Explorer 10 wrapper for Windows Store apps
This commit is contained in:
alizahid 2013-01-01 10:21:50 +05:00
commit 2f62826684

View file

@ -73,8 +73,9 @@ exports.isMac = (os == "mac");
// Is the user using a browser that identifies itself as Linux
exports.isLinux = (os == "linux");
// Windows Store JavaScript apps (aka Metro apps written in HTML5 and JavaScript) do not use the "Microsoft Internet Explorer" string in their user agent, but "MSAppHost" instead.
exports.isIE =
navigator.appName == "Microsoft Internet Explorer"
(navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
&& parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
exports.isOldIE = exports.isIE && exports.isIE < 9;