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