1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Use more for...of loops in the code-base

Most, if not all, of this code is old enough to predate the general availability of `for...of` iteration.
This commit is contained in:
Jonas Jenwald 2022-10-03 12:33:49 +02:00
parent 4e58dabb32
commit 60f6272ed9
16 changed files with 70 additions and 101 deletions

View file

@ -498,8 +498,8 @@ class SimpleXMLParser extends XMLParserBase {
if (!lastElement) {
return null;
}
for (let i = 0, ii = lastElement.childNodes.length; i < ii; i++) {
lastElement.childNodes[i].parentNode = lastElement;
for (const childNode of lastElement.childNodes) {
childNode.parentNode = lastElement;
}
return lastElement;
}