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: Undo accidental whitespace change Created Jan. 16, 2017, 2:57 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
Index: chrome/ext/popup.js
diff --git a/chrome/ext/popup.js b/chrome/ext/popup.js
index 40932374211505989553c15352d2e7215e7d07da..2a892cfe24db52286b0d6d384625d0bc6e5cb6ea 100644
--- a/chrome/ext/popup.js
+++ b/chrome/ext/popup.js
@@ -1,9 +1,10 @@
-(function()
+"use strict";
+
{
- var backgroundPage = chrome.extension.getBackgroundPage();
+ let backgroundPage = chrome.extension.getBackgroundPage();
window.ext = Object.create(backgroundPage.ext);
- ext.closePopup = function()
+ ext.closePopup = () =>
{
window.close();
};
@@ -13,9 +14,6 @@
ext.backgroundPage = {
sendMessage: chrome.runtime.sendMessage,
- getWindow: function()
- {
- return backgroundPage;
- }
+ getWindow() { return backgroundPage; }
Sebastian Noack 2017/01/16 15:35:55 As pointed out in a different file, in the previou
kzar 2017/01/17 07:42:48 Whoops, another victim from switching to an inline
};
-})();
+}

Powered by Google App Engine
This is Rietveld