/** * @typedef { typeof import("../../packages/nodebox").Nodebox } Nodebox * @type {Nodebox} */ const Nodebox = window.Nodebox; /** * @param {string} emulatorUrl */ window.runExample = async function (emulatorUrl) { const emulator = new Nodebox({ runtimeUrl: emulatorUrl, iframe: document.getElementById('frame'), }); await emulator.connect(); await emulator.fs.init({ '/styles.css': `body { font-family: sans-serif; -webkit-font-smoothing: auto; -moz-font-smoothing: auto; -moz-osx-font-smoothing: grayscale; font-smoothing: auto; text-rendering: optimizeLegibility; font-smooth: always; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; } h1 { font-size: 1.5rem; }`, '/index.js': `import "./styles.css"; document.getElementById("app").innerHTML = \`