-// Copyright (c) 2009-2012 Kris Maglione <maglione.k@gmail.com>
+// Copyright (c) 2009-2013 Kris Maglione <maglione.k@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
this.window = window;
},
- cleanups: Class.Memoize(function () []),
- objects: Class.Memoize(function () ({})),
+ cleanups: Class.Memoize(() => []),
+ objects: Class.Memoize(() => ({})),
get doc() this.window.document,
this.onWindowVisible = [];
},
- id: Class.Memoize(function () config.addon.id),
+ id: Class.Memoize(() => config.addon.id),
/**
* Adds an event listener for this session and removes it on
"content-document-global-created": function (window, uri) { this.observe(window, "toplevel-window-ready", null); },
"xul-window-visible": function () {
if (this.onWindowVisible)
- this.onWindowVisible.forEach(function (f) f.call(this), this);
+ this.onWindowVisible.forEach(f => { f.call(this); });
this.onWindowVisible = null;
}
},
return data[key] = val;
},
- overlayWindow: function (url, fn) {
+ overlayWindow: function overlayWindow(url, fn) {
if (url instanceof Ci.nsIDOMWindow)
overlay._loadOverlay(url, fn);
else {
}
}
- insert("before", function (elem, dom) elem.parentNode.insertBefore(dom, elem));
- insert("after", function (elem, dom) elem.parentNode.insertBefore(dom, elem.nextSibling));
- insert("append", function (elem, dom) elem.appendChild(dom));
- insert("prepend", function (elem, dom) elem.insertBefore(dom, elem.firstChild));
+ insert("before", (elem, dom) => elem.parentNode.insertBefore(dom, elem));
+ insert("after", (elem, dom) => elem.parentNode.insertBefore(dom, elem.nextSibling));
+ insert("append", (elem, dom) => elem.appendChild(dom));
+ insert("prepend", (elem, dom) => elem.insertBefore(dom, elem.firstChild));
if (obj.ready)
util.trapErrors("ready", obj, window);
get activeModules() this.activeWindow && this.activeWindow.dactyl.modules,
- get modules() this.windows.map(function (w) w.dactyl.modules),
+ get modules() this.windows.map(w => w.dactyl.modules),
/**
* The most recently active dactyl window.
*/
get activeWindow() this.windows[0],
- set activeWindow(win) this.windows = [win].concat(this.windows.filter(function (w) w != win)),
+ set activeWindow(win) this.windows = [win].concat(this.windows.filter(w => w != win)),
/**
* A list of extant dactyl windows.
*/
- windows: Class.Memoize(function () [])
+ windows: Class.Memoize(() => [])
});
endModule();