Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #45 by checking IE version which works also in IE11 compatibili… #49

Merged
merged 7 commits into from Apr 19, 2016
Prev Previous commit
Next Next commit
Fixes #45 by checking IE version which works also in IE11 compatibili…
…ty mode
  • Loading branch information
Václav Novotný committed Apr 8, 2016
commit d2eefea82e486624a394d77e64b81eebe289ba57
6 changes: 3 additions & 3 deletions lib/detect.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
flexibility.detect = function detect() {
// detects IE9 and lower even in compatibility mode
/*eslint no-magic-numbers: [2, { "ignore": [-1, 5, 9] }]*/
var msiePos = navigator.userAgent.indexOf('MSIE')
var msiePos = navigator.userAgent.indexOf('MSIE');
if (msiePos > -1) {
var msieVersion = parseInt(navigator.userAgent.slice(msiePos + 5))
var msieVersion = parseInt(navigator.userAgent.slice(msiePos + 5));
if (msieVersion <= 9)
return false
return false;
}

var node = document.createElement('p');
Expand Down