1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #14278 from Snuffleupagus/rm-removeChild

Replace the remaining `Node.removeChild()` instances with `Element.remove()`
This commit is contained in:
Tim van der Meij 2021-11-17 20:17:55 +01:00 committed by GitHub
commit 3dccaccbb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 14 deletions

View file

@ -590,7 +590,7 @@ var Driver = (function DriverClosure() {
}
const body = document.body;
while (body.lastChild !== this.end) {
body.removeChild(body.lastChild);
body.lastChild.remove();
}
const destroyedPromises = [];

View file

@ -245,9 +245,7 @@ window.onload = function () {
// const cell = ID("itemlist");
const table = document.getElementById("itemtable");
while (table.childNodes.length > 0) {
table.removeChild(table.childNodes[table.childNodes.length - 1]);
}
table.textContent = ""; // Remove any table contents from the DOM.
const tbody = document.createElement("tbody");
table.appendChild(tbody);