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

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

Issue 6353703170736128: Issue 1112 - Properly use polyfills in firstrun and settings pages (Closed)
Patch Set: Keeping the 'false' parameter Created July 23, 2014, 12:47 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/IESettings.js ('k') | html/static/js/settings.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: html/static/js/firstRun.js
===================================================================
--- a/html/static/js/firstRun.js
+++ b/html/static/js/firstRun.js
@@ -36,9 +36,9 @@
iframe.width = data.width;
iframe.height = data.height;
popupMessageReceived = true;
- removeListener(window, "message", popupMessageListener);
+ window.removeEventListener("message", popupMessageListener);
};
- addListener(window, "message", popupMessageListener);
+ window.addEventListener("message", popupMessageListener);
var listenCount = 0;
var popupLoadListener = function()
@@ -50,9 +50,9 @@
var popupCloseListener = function()
{
iframe.className = glassPane.className = "";
- removeListener(document, "click", popupCloseListener);
+ document.removeEventListener("click", popupCloseListener);
};
- addListener(document, "click", popupCloseListener);
+ document.addEventListener("click", popupCloseListener);
}
else
{
@@ -60,15 +60,15 @@
if (++listenCount > 20)
{
glassPane.className = "";
- removeListener(window, "message", popupMessageListener);
+ window.removeEventListener("message", popupMessageListener);
}
else
setTimeout(popupLoadListener, 250);
}
- removeListener(iframe, "load", popupLoadListener);
+ iframe.removeEventListener("load", popupLoadListener);
};
- addListener(iframe, "load", popupLoadListener);
+ iframe.addEventListener("load", popupLoadListener);
iframe.src = url;
glassPane.className = "visible";
@@ -84,7 +84,7 @@
networks.forEach(function(network)
{
var link = document.getElementById("share-" + network + "-" + variant);
- addListener(link, "click", function(e)
+ link.addEventListener("click", function(e)
{
e.preventDefault();
openSharePopup(getDocLink("share-" + network) + "&variant=" + variant);
« no previous file with comments | « html/static/js/IESettings.js ('k') | html/static/js/settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld