From 5b3a7e18e9bdfcf77cd1263f88e7e991b7df5806 Mon Sep 17 00:00:00 2001 From: Alex Pernot Date: Wed, 21 Jan 2015 20:29:23 +0100 Subject: [PATCH] Solved #9 Replaced the deprecated __defineGetter__() with the standard Object.defineProperty(). Should now work with IE 9+ instead of 11+. --- lib/arboreal.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; + }; });