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

Add <win> parameter to load autocmds.

This commit is contained in:
Kris Maglione
2011-06-08 14:44:38 -04:00
parent 124a3eba69
commit 0bdd20d8e2
2 changed files with 8 additions and 1 deletions

View File

@@ -43,12 +43,18 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase),
title: doc.title
};
if (dactyl.has("tabs")) {
if (!dactyl.has("tabs"))
update(args, { doc: doc, win: doc.defaultView });
else {
args.tab = tabs.getContentIndex(doc) + 1;
args.doc = {
valueOf: function () doc,
toString: function () "tabs.getTab(" + (args.tab - 1) + ").linkedBrowser.contentDocument"
};
args.win = {
valueOf: function () doc.defaultView,
toString: function () "tabs.getTab(" + (args.tab - 1) + ").linkedBrowser.contentWindow"
};
}
autocommands.trigger(name, args);