1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-31 18:05:46 +01:00

Liberate Buffer from the tyrany of the current window. Add DOM#contextmenu event. Provide sensible screenX/screenY for mouse events.

--HG--
rename : common/content/buffer.js => common/modules/buffer.jsm
This commit is contained in:
Kris Maglione
2011-10-01 22:06:15 -04:00
parent 5017217535
commit 36fac82035
11 changed files with 453 additions and 307 deletions

View File

@@ -505,6 +505,17 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
dequote: function dequote(pattern, chars)
pattern.replace(/\\(.)/, function (m0, m1) chars.indexOf(m1) >= 0 ? m1 : m0),
/**
* Returns the nsIDocShell for the given window.
*
* @param {Window} win The window for which to get the docShell.
* @returns {nsIDocShell}
*/
docShell: function docShell(win)
win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell),
/**
* Prints a message to the console. If *msg* is an object it is pretty
* printed.