Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: html/static/js/ieEventListenerPolyfill.js

Issue 6196733759455232: Issue 1181 - Change polyfill for IE8 (fix settings page) (Closed)
Patch Set: Add back addEventListener/removeEventListener handlers Created Aug. 8, 2014, 1:30 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « html/static/js/firstRun.js ('k') | html/static/js/ieFirstRun.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: html/static/js/ieEventListenerPolyfill.js
===================================================================
--- a/html/static/js/ieEventListenerPolyfill.js
+++ b/html/static/js/ieEventListenerPolyfill.js
@@ -13,3 +13,19 @@
this.detachEvent("on" + type, handler)
};
}
+
+if (typeof Element.prototype.addEventListener != "function")
Felix Dahlke 2014/08/08 13:58:35 My question remains: Is this still necessary to fi
Oleksandr 2014/08/08 14:05:17 Oh, I miss understood you before then. Yes, it is
Felix Dahlke 2014/08/08 14:07:01 Ah, I see! Misunderstanding then.
+{
+ Element.prototype.addEventListener = function(type, handler, capture)
Felix Dahlke 2014/08/08 14:07:01 Can we assign this to window.addEventListener, and
+ {
+ this.attachEvent("on" + type, handler)
+ };
+}
+
+if (typeof Element.prototype.removeEventListener != "function")
+{
+ Element.prototype.removeEventListener = function(type, handler)
+ {
+ this.detachEvent("on" + type, handler)
+ };
+}
« no previous file with comments | « html/static/js/firstRun.js ('k') | html/static/js/ieFirstRun.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld