MDN self-hosted library · e01.org

Content-Security-Policy: script-src-attr directive

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

html
<button id="btn" onclick="doSomething()">Click me</button>
js
document.getElementById("btn").addEventListener("click", doSomething);