HTMLScriptElement: integrity property - Web APIs | MDN

Value

A string.

Examples

html

<script
  id="el"
  src="https://example.com/example-framework.js"
  integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
  crossorigin="anonymous"></script>

js

const el = document.getElementById("el");
console.log(el.integrity); // Output: "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"

Specifications

Specification
HTML
# dom-script-integrity

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.