mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #15031 from Snuffleupagus/prefer-modern-dom-apis
Enable the `unicorn/prefer-modern-dom-apis` ESLint plugin rule
This commit is contained in:
commit
1a6ae5f034
4 changed files with 6 additions and 5 deletions
|
@ -2559,9 +2559,9 @@ class AnnotationLayer {
|
|||
if (!firstChild) {
|
||||
element.append(canvas);
|
||||
} else if (firstChild.nodeName === "CANVAS") {
|
||||
element.replaceChild(canvas, firstChild);
|
||||
firstChild.replaceWith(canvas);
|
||||
} else {
|
||||
element.insertBefore(canvas, firstChild);
|
||||
firstChild.before(canvas);
|
||||
}
|
||||
}
|
||||
annotationCanvasMap.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue