Fix double definition of `length` property in uDom

The `length` property of `DOMList` couldn't be re-defined, because earlier
an Object.defineProperty was used on the object without a setter.
This commit is contained in:
Deathamns 2014-11-09 11:59:34 +01:00
parent 30ef97a678
commit 4bf6664d6b
1 changed files with 0 additions and 14 deletions

View File

@ -19,8 +19,6 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
/******************************************************************************/
/* exported uDom */ /* exported uDom */
'use strict'; 'use strict';
@ -42,18 +40,6 @@ var DOMList = function() {
/******************************************************************************/ /******************************************************************************/
Object.defineProperty(
DOMList.prototype,
'length',
{
get: function() {
return this.nodes.length;
}
}
);
/******************************************************************************/
var DOMListFactory = function(selector, context) { var DOMListFactory = function(selector, context) {
var r = new DOMList(); var r = new DOMList();
if ( typeof selector === 'string' ) { if ( typeof selector === 'string' ) {