windex

jQuery-like that's safe to use in a Firefox Extension
git clone https://wehaveforgeathome.hates.computer/windex.git
Log | Files | Refs | LICENSE

commit 34ac40bd13cf958cd96dcdc08653ffde0e530208
parent c080d81858617372ddf8db50ae9eefc4548b2e08
Author: Ryan Wolf <rwolf@borderstylo.com>
Date:   Thu, 13 Jan 2011 17:42:21 -0800

implemented isEmptyObject (thanks, nick)

Diffstat:
Mwindex.js | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/windex.js b/windex.js @@ -97,6 +97,12 @@ Windex.matchesSelector = function (node, selector) { }); }; +// See: http://api.jquery.com/jQuery.isEmptyObject/ +var Windex.isEmptyObject = function (obj) { + for(var i in obj) { return false; } + return true; +}; + var WindexNodes = function (nodes, selector, context) { for (i = 0; i < nodes.length; i++) { // See: https://developer.mozilla.org/en/XPCNativeWrapper