Fix for issue #376 - IE11 didn't populate the Device.ieVersion value. Now extracted from Trident revision, but still use Device.trident instead for IE11+ checks.

This commit is contained in:
photonstorm
2014-02-10 02:23:45 +00:00
parent ae74cb02dd
commit d2366d5fa5
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -189,7 +189,7 @@ Phaser.Device = function () {
this.ie = false;
/**
* @property {number} ieVersion - If running in Internet Explorer this will contain the major version number.
* @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Device.trident and Device.tridentVersion.
* @default
*/
this.ieVersion = 0;
@@ -474,11 +474,12 @@ Phaser.Device.prototype = {
{
this.silk = true;
}
else if (/Trident\/(\d+\.\d+);/.test(ua))
else if (/Trident\/(\d+\.\d+); rv:(\d+\.\d+)/.test(ua))
{
this.ie = true;
this.trident = true;
this.tridentVersion = parseInt(RegExp.$1, 10);
this.ieVersion = parseInt(RegExp.$2, 10);
}
// WebApp mode in iOS