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: Reuse code for addEventListener/removeEventListener Created Aug. 8, 2014, 2:18 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,13 @@
this.detachEvent("on" + type, handler)
};
}
+
+if (typeof Element.prototype.addEventListener != "function")
+{
+ Element.prototype.addEventListener = window.addEventListener;
Oleksandr 2014/08/08 14:19:34 Looks like we've tried every combination now :)
Felix Dahlke 2014/08/08 14:21:12 Yes, I like this one best :)
+}
+
+if (typeof Element.prototype.removeEventListener != "function")
+{
+ Element.prototype.removeEventListener = window.removeEventListener;
+}
« 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