fix: improve external script plugin (#632)
This commit is contained in:
parent
1897bb6af0
commit
50c2434ab5
2 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ function handleExternalScript() {
|
|||
var newScript = document.createElement('script');
|
||||
|
||||
Array.prototype.slice.call(script.attributes).forEach(function (attribute) {
|
||||
newScript[attribute.name] = attribute.value;
|
||||
newScript.setAttribute(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
script.parentNode.insertBefore(newScript, script);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue