<video id="media" src="https://example.com/video.mp4"></video>HTMLVideoElement: resize event / notebook
HTMLVideoElement: resize event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const el = document.getElementById("media");
el.addEventListener("resize", () => {
console.log("The size of the video element has changed!");
});