MDN self-hosted library · e01.org
Window / notebook

Window

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

js
window.onresize = (e) => console.log(e.currentTarget);
document.body.onresize = (e) => console.log(e.currentTarget);
html
<body onresize="console.log(event.currentTarget)"></body>