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:
commit
3dccaccbb4
7 changed files with 10 additions and 14 deletions
|
@ -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 = [];
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue