Skip to content

Commit 8ace4f4

Browse files
committed
fix iter 'attributes'
NamedNodeMap is remaed to MozNamedAttrMap since Fx22. see: https://bugzilla.mozilla.org/show_bug.cgi?id=847195
1 parent d0458ef commit 8ace4f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/content/base.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ function iter(obj) {
6767
})();
6868
if (isinstance(obj, [HTMLCollection, NodeList]))
6969
return (node for (node of obj));
70-
if (obj instanceof NamedNodeMap)
70+
if ((typeof NamedNodeMap !== "undefined" && obj instanceof NamedNodeMap) ||
71+
(typeof MozNamedAttrMap !== "undefined" && obj instanceof MozNamedAttrMap))
7172
return (function () {
7273
for (let i = 0, len = obj.length; i < len; ++i)
7374
yield [obj[i].name, obj[i]];

0 commit comments

Comments
 (0)