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 adea3ca commit 2c7d95dCopy full SHA for 2c7d95d
packages/svelte/src/internal/client/reconciler.js
@@ -19,11 +19,10 @@ export function create_fragment_with_script_from_html(html) {
19
var scripts = content.querySelectorAll('script');
20
for (const script of scripts) {
21
var newScript = document.createElement('script');
22
- if (script.src) {
23
- newScript.src = script.src;
24
- } else {
25
- newScript.textContent = script.textContent;
+ for (var i = 0; i < script.attributes.length; i++) {
+ newScript.setAttribute(script.attributes[i].name, script.attributes[i].value);
26
}
+ newScript.textContent = script.textContent;
27
/** @type {Node} */ (script.parentNode).replaceChild(newScript, script);
28
29
return content;
0 commit comments