Bug 792228 - Let marionette recognize NodeList during findelements, r=mdas

This commit is contained in:
Jonathan Griffin 2012-09-18 14:20:20 -07:00
parent 9ed24236c4
commit 7a238fad77

View File

@ -255,7 +255,7 @@ ElementManager.prototype = {
let found = all ? this.findElements(values.using, values.value, win.document, startNode) : this.findElement(values.using, values.value, win.document, startNode);
if (found) {
let type = Object.prototype.toString.call(found);
if ((type == '[object Array]') || (type == '[object HTMLCollection]')) {
if ((type == '[object Array]') || (type == '[object HTMLCollection]') || (type == '[object NodeList]')) {
let ids = []
for (let i = 0 ; i < found.length ; i++) {
ids.push(this.addToKnownElements(found[i]));