From 2024ba1bcd98cf5c19efaff589d494dd430574c7 Mon Sep 17 00:00:00 2001 From: Deathamns Date: Mon, 10 Nov 2014 19:25:17 +0100 Subject: [PATCH] Fix wrong fix in 4bf6664 --- src/js/udom.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/js/udom.js b/src/js/udom.js index 4df00f674..1d90f865d 100644 --- a/src/js/udom.js +++ b/src/js/udom.js @@ -40,6 +40,18 @@ var DOMList = function() { /******************************************************************************/ +Object.defineProperty( + DOMList.prototype, + 'length', + { + get: function() { + return this.nodes.length; + } + } +); + +/******************************************************************************/ + var DOMListFactory = function(selector, context) { var r = new DOMList(); if ( typeof selector === 'string' ) { @@ -196,12 +208,6 @@ var doesMatchSelector = function(node, selector) { /******************************************************************************/ -DOMList.prototype.length = function() { - return this.nodes.length; -}; - -/******************************************************************************/ - DOMList.prototype.nodeAt = function(i) { return this.nodes[i]; };