captureStream =
await navigator.mediaDevices.getDisplayMedia(displayMediaOptions);Screen Capture API / notebook
Screen Capture API
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<iframe allow="display-capture" src="/some-other-document.html">…</iframe>