1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 17:34:12 +01:00

Remove remaining comprehensions.

This commit is contained in:
Doug Kearns
2016-01-29 23:26:05 +11:00
parent b9849df565
commit c9c9cea6d0
5 changed files with 32 additions and 19 deletions

View File

@@ -304,9 +304,11 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
// Urgh. Hack.
let namespaces;
if (attrs)
namespaces = iter([k.slice(6), DOM.fromJSON.namespaces[v] || v]
for ([k, v] of iter(attrs))
if (/^xmlns(?:$|:)/.test(k))).toObject();
namespaces = iter(function* () {
for (let [k, v] of iter(attrs))
if (/^xmlns(?:$|:)/.test(k))
yield [k.slice(6), DOM.fromJSON.namespaces[v] || v];
}()).toObject();
let node = DOM.fromJSON(xml, doc, obj.objects, namespaces);