We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c65c7f commit e635e95Copy full SHA for e635e95
src/pat/inject/inject.js
@@ -819,13 +819,11 @@ const inject = {
819
elementbefore: "before",
820
}[cfg.action];
821
822
- // Clone nodes to avoid modifying the original
823
- const nodes = [...source_nodes].map(node => node.cloneNode(true));
824
- target[method](...nodes);
+ target[method](...source_nodes);
825
826
if (! cfg.removeTags?.includes("script")) {
827
// Find and execute scripts
828
- for (const node of nodes) {
+ for (const node of source_nodes) {
829
const scripts = node.querySelectorAll?.("script") || [];
830
for (const script of scripts) {
831
const new_script = document.createElement("script");
0 commit comments