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

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

Issue 4859491858251776: Fix the approach used in ieFirstRun.js (Closed)
Patch Set: Formatting nit addressed Created July 16, 2014, 11:19 a.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
===================================================================
new file mode 100644
--- /dev/null
+++ b/html/static/js/ieEventListenerPolyfill.js
@@ -0,0 +1,15 @@
+if (typeof window.addEventListener != "function")
+{
+ window.addEventListener = function(type, handler, capture)
+ {
+ this.attachEvent("on" + type, handler)
+ };
+}
+
+if (typeof window.removeEventListener != "function")
+{
+ window.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