We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7b0d1b commit 2653849Copy full SHA for 2653849
src/plugins/external-script.js
@@ -8,8 +8,8 @@ function handleExternalScript () {
8
if (script && script.src) {
9
const newScript = document.createElement('script')
10
11
- ;['src', 'async', 'defer'].forEach(attribute => {
12
- newScript[attribute] = script[attribute]
+ Array.prototype.slice.call(script.attributes).forEach(attribute => {
+ newScript[attribute.name] = attribute.value
13
})
14
15
script.parentNode.insertBefore(newScript, script)
0 commit comments