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:
parent
4e58dabb32
commit
60f6272ed9
16 changed files with 70 additions and 101 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue