MDN self-hosted library · e01.org

`nonce` HTML global attribute

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
import crypto from "node:crypto";

crypto.randomBytes(16).toString("base64");
// '8IBTHwOdqNKAWeKl7plt8g=='
html
<script nonce="8IBTHwOdqNKAWeKl7plt8g==">
  // …
</script>