summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/content/PlaceHolder.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content/PlaceHolder.js b/src/content/PlaceHolder.js
index ac4dc14..8f31951 100644
--- a/src/content/PlaceHolder.js
+++ b/src/content/PlaceHolder.js
@@ -144,7 +144,7 @@ var PlaceHolder = (() => {
replacement._placeHolderElement = element;
- element.parentNode.replaceChild(replacement, element);
+ element.replaceWith(replacement);
this.replacements.add(replacement);
}
@@ -162,8 +162,8 @@ var PlaceHolder = (() => {
return;
}
try {
- var element = replacement._placeHolderElement;
- replacement.parentNode.replaceChild(element, replacement);
+ let element = replacement._placeHolderElement;
+ replacement.replaceWith(element.cloneNode(true));
this.replacements.delete(replacement);
} catch (e) {
error(e, "While replacing");