From a9511428016c870d47c855606e250f625923dc93 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Fri, 3 May 2024 10:41:56 +0200 Subject: [PATCH] fix: iframe when script link is inside head fix #2913 --- site/source/entries/entry-iframe.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/source/entries/entry-iframe.ts b/site/source/entries/entry-iframe.ts index 3b0176b9d..62597c050 100644 --- a/site/source/entries/entry-iframe.ts +++ b/site/source/entries/entry-iframe.ts @@ -102,6 +102,10 @@ links.innerHTML = ` ` +if (script.parentElement?.tagName === 'HEAD') { + document.body.appendChild(iframe) + document.body.appendChild(links) +} script.before(iframe) script.before(links)