We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa5ca9f commit 792cfd0Copy full SHA for 792cfd0
src/components/CodeEmbed/frame.tsx
@@ -42,6 +42,8 @@ canvas {
42
}
43
${code.css || ""}
44
</style>
45
+<!-- If we need an addon script, load p5 the usual way with no caching to make sure
46
+the import order doesn't get messed up. -->
47
${((code.scripts?.length ?? 0) > 0 ? [cdnLibraryUrl, ...(code.scripts ?? [])] : []).map((src) => `<script type="text/javascript" src="${src}"></script>`).join('\n')}
48
<body>${code.htmlBody || ""}</body>
49
<script id="code" type="text/javascript">${wrapSketch(code.js) || ""}</script>
0 commit comments