MDN self-hosted library · e01.org

Cross-Origin-Embedder-Policy (COEP) header

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

html
<img src="https://another-example.com/some-image.png" />
js
const myWorker = new Worker("worker.js");

if (crossOriginIsolated) {
  const buffer = new SharedArrayBuffer(16);
  myWorker.postMessage(buffer);
} else {
  const buffer = new ArrayBuffer(16);
  myWorker.postMessage(buffer);
}
html
<img src="https://thirdparty.com/img.png" crossorigin />