mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
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:
parent
30ef97a678
commit
4bf6664d6b
@ -19,8 +19,6 @@
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* exported uDom */
|
||||
'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 r = new DOMList();
|
||||
if ( typeof selector === 'string' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user