mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[spidermonkey] forEach and other Array methods for nodelist
This commit is contained in:
parent
15ac18c04f
commit
8bba9f8c4e
@ -82,7 +82,7 @@ JSClassOps nodeList_ops = {
|
||||
|
||||
JSClass nodeList_class = {
|
||||
"nodeList",
|
||||
JSCLASS_HAS_RESERVED_SLOTS(1),
|
||||
JSCLASS_HAS_RESERVED_SLOTS(1) | JSCLASS_HAS_CACHED_PROTO(JSProto_Array),
|
||||
&nodeList_ops
|
||||
};
|
||||
|
||||
|
@ -18,6 +18,14 @@ console.error('element.matches');
|
||||
}
|
||||
}
|
||||
console.assert(ch, 'was matched');
|
||||
birds = document.querySelectorAll('li');
|
||||
|
||||
ch = false;
|
||||
var counter = 0;
|
||||
birds.forEach(function(b) {
|
||||
counter++;
|
||||
});
|
||||
console.assert(counter === 3, 'Three');
|
||||
|
||||
console.exit(0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user