Index: html/static/js/ieEventListenerPolyfill.js |
=================================================================== |
--- a/html/static/js/ieEventListenerPolyfill.js |
+++ b/html/static/js/ieEventListenerPolyfill.js |
@@ -1,14 +1,14 @@ |
-if (typeof window.addEventListener != "function") |
Felix Dahlke
2014/08/08 12:34:08
I'm not sure why this works in IE8 frankly, window
Oleksandr
2014/08/08 13:11:06
It actually wasn't working on firstrun page, my ba
|
+if (typeof Element.prototype.addEventListener != "function") |
{ |
- window.addEventListener = function(type, handler, capture) |
+ Element.prototype.addEventListener = function(type, handler, capture) |
{ |
this.attachEvent("on" + type, handler) |
}; |
} |
-if (typeof window.removeEventListener != "function") |
+if (typeof Element.prototype.removeEventListener != "function") |
{ |
- window.removeEventListener = function(type, handler) |
+ Element.prototype.removeEventListener = function(type, handler) |
{ |
this.detachEvent("on" + type, handler) |
}; |