diff --git a/src/webui/www/private/scripts/contextmenu.js b/src/webui/www/private/scripts/contextmenu.js index 758783411..b63c9c819 100644 --- a/src/webui/www/private/scripts/contextmenu.js +++ b/src/webui/www/private/scripts/contextmenu.js @@ -534,7 +534,7 @@ window.qBittorrent.ContextMenu ??= (() => { updateTagsSubMenu(tagList) { const contextTagList = $("contextTagList"); while (contextTagList.firstChild !== null) - contextTagList.removeChild(contextTagList.firstChild); + contextTagList.firstChild.remove(); const createMenuItem = (text, imgURL, clickFn) => { const anchor = document.createElement("a"); diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 4a3b2c7e6..4fa836397 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -219,7 +219,7 @@ window.qBittorrent.DynamicTable ??= (() => { this.loadColumnsOrder(); this.updateTableHeaders(); while (this.tableBody.firstChild) - this.tableBody.removeChild(this.tableBody.firstChild); + this.tableBody.firstChild.remove(); this.updateTable(true); } if (this.currentHeaderAction === "drag") { @@ -398,7 +398,7 @@ window.qBittorrent.DynamicTable ??= (() => { // recreate child nodes when reusing (enables the context menu to work correctly) if (ul.hasChildNodes()) { while (ul.firstChild) - ul.removeChild(ul.lastChild); + ul.lastChild.remove(); } for (let i = 0; i < this.columns.length; ++i) { diff --git a/src/webui/www/private/scripts/lib/vanillaSelectBox.js b/src/webui/www/private/scripts/lib/vanillaSelectBox.js index 73e33703a..fc5ebf5c5 100644 --- a/src/webui/www/private/scripts/lib/vanillaSelectBox.js +++ b/src/webui/www/private/scripts/lib/vanillaSelectBox.js @@ -862,7 +862,7 @@ vanillaSelectBox.prototype.remoteSearchIntegrateIt = function (data) { let self = this; if (data == null || data.length == 0) return; while(self.root.firstChild) - self.root.removeChild(self.root.firstChild); + self.root.firstChild.remove(); self.buildSelect(data); self.reloadTree(); diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index dd1ff862d..d79864155 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -1124,7 +1124,7 @@ const initializeWindows = () => { element.download = (name + ".torrent"); document.body.appendChild(element); element.click(); - document.body.removeChild(element); + element.remove(); // https://stackoverflow.com/questions/53560991/automatic-file-downloads-limited-to-10-files-on-chrome-browser await window.qBittorrent.Misc.sleep(200);