diff --git a/src/ecmascript/spidermonkey/nodelist.cpp b/src/ecmascript/spidermonkey/nodelist.cpp index 0f66b358..c5c8589a 100644 --- a/src/ecmascript/spidermonkey/nodelist.cpp +++ b/src/ecmascript/spidermonkey/nodelist.cpp @@ -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 }; diff --git a/test/ecmascript/assert/element.matches.html b/test/ecmascript/assert/element.matches.html index 2d78edda..3ddf55c8 100644 --- a/test/ecmascript/assert/element.matches.html +++ b/test/ecmascript/assert/element.matches.html @@ -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);