diff --git a/client/modules/Preview/EmbedFrame.jsx b/client/modules/Preview/EmbedFrame.jsx index e445fc152d..43f229fa2d 100644 --- a/client/modules/Preview/EmbedFrame.jsx +++ b/client/modules/Preview/EmbedFrame.jsx @@ -252,7 +252,7 @@ function injectLocalFiles(files, htmlFile, options) { 'PREVIEW_SCRIPTS_URL' )}`; previewScripts.setAttribute('crossorigin', ''); - sketchDoc.body.appendChild(previewScripts); + sketchDoc.head.appendChild(previewScripts); const sketchDocString = `\n${sketchDoc.documentElement.outerHTML}`; scriptOffs = getAllScriptOffsets(sketchDocString);