We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d458abc commit 5280097Copy full SHA for 5280097
function-patterns/init-time-branching.html
@@ -15,7 +15,7 @@
15
addListener: function (el, type, fn) {
16
if (typeof window.addEventListener === 'function') {
17
el.addEventListener(type, fn, false);
18
- } else if (typeof document.attachEvent === 'function') {
+ } else if (typeof document.attachEvent !== 'undefined') {
19
el.attachEvent('on' + type, fn);
20
} else {
21
el['on' + type] = fn;
@@ -36,7 +36,7 @@
36
utils.addListener = function (el, type, fn) {
37
38
};
39
-} else if (typeof document.attachEvent === 'function') { // IE
+} else if (typeof document.attachEvent !== 'undefined') { // IE
40
41
42
0 commit comments