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

Unified Diff: chrome/ext/popup.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Addressed some more feedback Created Jan. 18, 2017, 11:44 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 | « chrome/ext/devtools.js ('k') | composer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/popup.js
diff --git a/chrome/ext/popup.js b/chrome/ext/popup.js
index 40932374211505989553c15352d2e7215e7d07da..f5132aa457a4366129078917064aefc9092ebc42 100644
--- a/chrome/ext/popup.js
+++ b/chrome/ext/popup.js
@@ -1,9 +1,10 @@
-(function()
+"use strict";
+
{
- var backgroundPage = chrome.extension.getBackgroundPage();
- window.ext = Object.create(backgroundPage.ext);
+ const backgroundPage = chrome.extension.getBackgroundPage();
+ var ext = Object.create(backgroundPage.ext);
- ext.closePopup = function()
+ ext.closePopup = () =>
{
window.close();
};
@@ -13,9 +14,9 @@
ext.backgroundPage = {
sendMessage: chrome.runtime.sendMessage,
- getWindow: function()
+ getWindow()
{
return backgroundPage;
}
};
-})();
+}
« no previous file with comments | « chrome/ext/devtools.js ('k') | composer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld