1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-15 15:04:13 +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);

View File

@@ -40,6 +40,7 @@
<dt>&lt;tags></dt> <dd>The tags applied to <em>&lt;url></em>. Only for <em>Bookmark*</em>.</dd>
<dt>&lt;title></dt> <dd>The page, bookmark or download title.</dd>
<dt>&lt;url></dt> <dd>The URL against which the event was selected.</dd>
<dt>&lt;win></dt> <dd>The window for which the event occurred. Only for <em>DOMLoad</em>, <em>PageLoad</em> and <em>PageLoadPre</em>.</dd>
</dl>
</overlay>