diff --git a/lib/arboreal.js b/lib/arboreal.js index 0135c0c..cca404e 100644 --- a/lib/arboreal.js +++ b/lib/arboreal.js @@ -236,8 +236,10 @@ return nodeList; }; - Arboreal.prototype.__defineGetter__("length", function () { - return this.toArray().length; + Object.defineProperty(Arboreal.prototype, 'length', { + get: function() { + return this.toArray().length; + }; });