Skip to content

Commit

Permalink
fix: iframe when script link is inside head
Browse files Browse the repository at this point in the history
fix #2913
  • Loading branch information
johangirod committed May 3, 2024
1 parent 2bcd1e3 commit a951142
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions site/source/entries/entry-iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a951142

Please sign in to comment.