1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 09:45:46 +01:00
This commit is contained in:
Kris Maglione
2012-01-27 10:20:21 -05:00
parent 97ff27f575
commit cbb748f5dd
3 changed files with 14 additions and 11 deletions

View File

@@ -55,12 +55,12 @@ var DOM = Class("DOM", {
this[length++] = DOM.fromXML(val, context, this.nodes);
else if (val instanceof Ci.nsIDOMNode || val instanceof Ci.nsIDOMWindow)
this[length++] = val;
else if ("length" in val)
for (let i = 0; i < val.length; i++)
this[length++] = val[i];
else if ("__iterator__" in val || isinstance(val, ["Iterator", "Generator"]))
for (let elem in val)
this[length++] = elem;
else if ("length" in val)
for (let i = 0; i < val.length; i++)
this[length++] = val[i];
else
this[length++] = val;