Our basicjs.html uses eval() to run javascript snippets and therefore cannot use static import declarations. We offer importjs.html which uses a clever mix of import() and a data url instead of eval(), thereby permitting static imports.
Here we offer to sprinkle confetti in the frame.
Provide a string with "export default" to tell the snippet runner how to display simple results.
import canvasConfetti from "https://cdn.jsdelivr.net/npm/canvas-confetti@1.9.2/+esm" canvasConfetti() export default "<h2>Ta-da!</h2>"
Our first frame uses basicjs.html . No confetti.
//wiki.dbbs.co/assets/pages/js-snippet-template/basicjs.html HEIGHT 75
Our second frame uses importjs.html .
//wiki.dbbs.co/assets/pages/js-snippet-template/importjs.html HEIGHT 75