Fix feature detection for IE

operator `!` has higher precedence (4) than operator `in` (8). Parentheses are mandatory here.
This commit is contained in:
Cédric Bertolini 2016-06-13 10:55:07 +02:00 committed by Christophe Coevoet
parent ad1ffc5e95
commit b35658b1ff
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@
var addEventListener;
var el = document.createElement('div');
if (!'addEventListener' in el) {
if (!('addEventListener' in el)) {
addEventListener = function (element, eventName, callback) {
element.attachEvent('on' + eventName, callback);
};