Tab indents; Esc then Tab leaves the editor. Ctrl+Enter or ⌘+Enter runs.
- No messages.
html-in-canvas-polyfill
Edit the HTML-in-Canvas example and run it. The preview draws live HTML into a canvas with the proposed API:
<canvas content="drawable">, drawElementImage and the paint event. Click the drawn field and type.
Tab indents; Esc then Tab leaves the editor. Ctrl+Enter or ⌘+Enter runs.
The preview loads the polyfill's core and engines bundles from this site, then your code. Where the browser has a complete native implementation, the polyfill steps aside and your code runs on the browser's own; the line above the preview says which. A dashed outline marks the canvas (Show canvas bounds); it is not part of your code. The effects and the plugins are not loaded: try them in the plugin gallery.
The preview is a sandboxed frame with an opaque origin: it cannot read this site's cookies or storage, open windows or dialogs, or submit forms. Images and fonts from another server are drawn only if that server allows cross-origin (CORS) reads. If your code stops responding, edit it and press Run, or press Reset.
It stays in your browser. Share puts it in the link's # fragment, which browsers do not send to the server.
The editor's colours come from Prism, loaded from cdnjs; without it, the code shows in plain text.
Tested in desktop Chrome, Firefox 155+ and Safari 27+.