fix: iframe when script link is inside head

fix #2913
pull/2944/head
Johan Girod 2024-05-03 10:41:56 +02:00
parent 2bcd1e3c56
commit a951142801
1 changed files with 4 additions and 0 deletions

View File

@ -102,6 +102,10 @@ links.innerHTML = `
</div>
`
if (script.parentElement?.tagName === 'HEAD') {
document.body.appendChild(iframe)
document.body.appendChild(links)
}
script.before(iframe)
script.before(links)