 Issue 29371763:
  Issue 4795 - Use modern JavaScript syntax  (Closed)
    
  
    Issue 29371763:
  Issue 4795 - Use modern JavaScript syntax  (Closed) 
  | Index: chrome/ext/popup.js | 
| diff --git a/chrome/ext/popup.js b/chrome/ext/popup.js | 
| index 40932374211505989553c15352d2e7215e7d07da..c6f7787daa54a027415bf4d6d395ffa8afeb4556 100644 | 
| --- a/chrome/ext/popup.js | 
| +++ b/chrome/ext/popup.js | 
| @@ -1,9 +1,10 @@ | 
| -(function() | 
| +"use strict"; | 
| + | 
| { | 
| - var backgroundPage = chrome.extension.getBackgroundPage(); | 
| + const backgroundPage = chrome.extension.getBackgroundPage(); | 
| window.ext = Object.create(backgroundPage.ext); | 
| 
Sebastian Noack
2017/01/18 11:24:26
Assigning to the global object (i.e. window) isn't
 
kzar
2017/01/18 11:46:36
Done.
 | 
| - ext.closePopup = function() | 
| + ext.closePopup = () => | 
| { | 
| window.close(); | 
| }; | 
| @@ -13,9 +14,9 @@ | 
| ext.backgroundPage = { | 
| sendMessage: chrome.runtime.sendMessage, | 
| - getWindow: function() | 
| + getWindow() | 
| { | 
| return backgroundPage; | 
| } | 
| }; | 
| -})(); | 
| +} |