mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 11:07:58 +01:00
Closes issue #790.
This commit is contained in:
@@ -1568,13 +1568,14 @@ var DOM = Class("DOM", {
|
|||||||
);
|
);
|
||||||
|
|
||||||
let res = {
|
let res = {
|
||||||
|
iterateNext: function () result.iterateNext(),
|
||||||
|
get resultType() result.resultType,
|
||||||
|
get snapshotLength() result.snapshotLength,
|
||||||
|
snapshotItem: function (i) result.snapshotItem(i),
|
||||||
__iterator__:
|
__iterator__:
|
||||||
asIterator ? function () { let elem; while ((elem = this.iterateNext())) yield elem; }
|
asIterator ? function () { let elem; while ((elem = this.iterateNext())) yield elem; }
|
||||||
: function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); }
|
: function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); }
|
||||||
};
|
};
|
||||||
|
|
||||||
for (let [k, v] in Iterator(result))
|
|
||||||
res[k] = v;
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user