1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-08 09:54:12 +01:00

Import some fixes from Vimperator. Thanks anekos, teramoko, and stepnem.

This commit is contained in:
Kris Maglione
2010-09-18 03:42:48 -04:00
parent bc7cff0442
commit 508cc08a8f
10 changed files with 36 additions and 28 deletions

View File

@@ -451,6 +451,16 @@ const Util = Module("Util", {
return idx > -1 && idx + domain.length == host.length && (idx == 0 || host[idx-1] == ".");
},
/**
* Returns true if the given DOM node is currently visible.
*
* @param {Node} node
*/
isVisible: function (node) {
let style = util.computedStyle(node);
return style.visibility == "visible" && style.display != "none";
},
/**
* Returns an XPath union expression constructed from the specified node
* tests. An expression is built with node tests for both the null and