2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Change element.parentNode.removeChild(element) to element.remove() (#34071)

This commit is contained in:
GeoSot
2021-05-25 18:30:38 +03:00
committed by GitHub
parent 69a9b87945
commit 544d9ac3cf
5 changed files with 9 additions and 15 deletions
+1 -5
View File
@@ -116,11 +116,7 @@ class Backdrop {
EventHandler.off(this._element, EVENT_MOUSEDOWN)
const { parentNode } = this._getElement()
if (parentNode) {
parentNode.removeChild(this._element)
}
this._element.remove()
this._isAppended = false
}
+1 -1
View File
@@ -108,7 +108,7 @@ export function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
const elName = el.nodeName.toLowerCase()
if (!allowlistKeys.includes(elName)) {
el.parentNode.removeChild(el)
el.remove()
continue
}