MDN self-hosted library · e01.org

Request: integrity property

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

js
const myRequest = new Request("flowers.jpg");
console.log(myRequest.integrity); // ""
js
const myRequest = new Request("flowers.jpg", {
  integrity: "sha256-abc123",
});
console.log(myRequest.integrity); // "sha256-abc123"