1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-27 14:42:27 +01:00

Closes issue #729.

This commit is contained in:
Kris Maglione
2011-11-28 08:46:07 -05:00
parent 42aa15d786
commit 81271ab4ef
2 changed files with 13 additions and 3 deletions

View File

@@ -1859,6 +1859,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
dactyl.log(_("dactyl.modulesLoaded"), 3);
userContext.DOM = Class("DOM", DOM, { init: function DOM_(sel, ctxt) DOM(sel, ctxt || buffer.focusedFrame.document) });
userContext.$ = modules.userContext.DOM;
dactyl.timeout(function () {
try {
var args = config.prefs.get("commandline-args")

View File

@@ -19,9 +19,8 @@ var states = iter([v, k.slice(prefix.length).toLowerCase()]
var Download = Class("Download", {
init: function init(id, list) {
let self = XPCSafeJSObjectWrapper(services.downloadManager.getDownload(id));
self.__proto__ = this;
this.instance = this;
let self = this;
this.download = services.downloadManager.getDownload(id);
this.list = list;
this.nodes = {
@@ -192,6 +191,14 @@ var Download = Class("Download", {
this.updateProgress();
}
});
Object.keys(XPCOMShim([Ci.nsIDownload])).forEach(function (key) {
if (!(key in Download.prototype))
Object.defineProperty(Download.prototype, key, {
get: function get() this.download[key],
set: function set(val) this.download[key] = val,
configurable: true
});
});
var DownloadList = Class("DownloadList",
XPCOM([Ci.nsIDownloadProgressListener,