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:
@@ -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")
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user