Update childNode.parentNode.removeChild(childNode) pattern to childNode.remove().

This commit is contained in:
hackademix 2019-07-21 10:15:37 +02:00
parent c7f053a622
commit dc2cf89b3f
2 changed files with 4 additions and 4 deletions

View File

@ -186,7 +186,7 @@ var PlaceHolder = (() => {
close(replacement) { close(replacement) {
replacement.classList.add("closing"); replacement.classList.add("closing");
this.replacements.delete(replacement); this.replacements.delete(replacement);
window.setTimeout(() => replacement.parentNode.removeChild(replacement), 500); window.setTimeout(() => replacement.remove(), 500);
} }
} }

View File

@ -162,7 +162,7 @@ var UI = (() => {
canary.style.display = "none"; canary.style.display = "none";
document.body.appendChild(canary); document.body.appendChild(canary);
UI.highContrast = window.getComputedStyle(canary).backgroundImage === "none"; UI.highContrast = window.getComputedStyle(canary).backgroundImage === "none";
canary.parentNode.removeChild(canary); canary.remove();
} }
return UI.highContrast; return UI.highContrast;
} }
@ -361,7 +361,7 @@ var UI = (() => {
this.rowTemplate = this.initRow(); this.rowTemplate = this.initRow();
for (let r of this.allSiteRows()) { for (let r of this.allSiteRows()) {
r.parentNode.removeChild(r); r.remove();
} }
this.customize(null); this.customize(null);
this.sitesCount = 0; this.sitesCount = 0;
@ -760,7 +760,7 @@ var UI = (() => {
policy.set(site, row.perms); policy.set(site, row.perms);
for(let r of this.allSiteRows()) { for(let r of this.allSiteRows()) {
if (r !== row && r.siteMatch === site && r.contextMatch === row.contextMatch) { if (r !== row && r.siteMatch === site && r.contextMatch === row.contextMatch) {
r.parentNode.removeChild(r); r.remove();
} }
} }
let newRow = this.createSiteRow(site, site, row.perms, row.contextMatch, row.sitesCount); let newRow = this.createSiteRow(site, site, row.perms, row.contextMatch, row.sitesCount);