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

Unified Diff: chrome/content/ui/sidebar.js

Issue 5055554716172288: Issue 653 -Object.defineProperty instead of defineGetter / defineSetter (Closed)
Patch Set: Created June 9, 2014, 9:29 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
Index: chrome/content/ui/sidebar.js
===================================================================
--- a/chrome/content/ui/sidebar.js
+++ b/chrome/content/ui/sidebar.js
@@ -80,17 +80,17 @@ function init() {
let wnd = parent.document.documentElement;
for (let attr in defaults)
if (!wnd.hasAttribute(attr))
wnd.setAttribute(attr, defaults[attr]);
}
let {getBrowser, addBrowserLocationListener} = require("appSupport");
- window.__defineGetter__("content", function() {return getBrowser(mainWin).contentWindow;});
+ Object.defineProperty(window, "content", { get: () => getBrowser(mainWin).contentWindow });
// Initialize matcher for disabled filters
reloadDisabledFilters();
FilterNotifier.addListener(reloadDisabledFilters);
Prefs.addListener(onPrefChange);
// Activate flasher
list.addEventListener("select", onSelectionChange, false);

Powered by Google App Engine
This is Rietveld