This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
var myIntegrity = request.integrity;
The subresource integrity value of the request (e.g.,
If an integrity has not been specified, the property returns
In the following snippet, we create a new request using the
Request.Request() constructor (for an image file in the same directory as the script), then save the request
integrity value in a variable:
var myRequest = new Request('flowers.jpg'); var myIntegrity = myRequest.integrity;
The definition of 'integrity' in that specification.
|Living Standard||Initial definition|
|Feature||Chrome||Edge||Firefox (Gecko)||Internet Explorer||Opera||Safari (WebKit)|
|Basic support||45||(Yes)||(Yes)||No support||
|Feature||Android||Edge||Firefox Mobile (Gecko)||IE Phone||Opera Mobile||Safari Mobile||Chrome for Android|
|Basic support||No support||(Yes)||(Yes)||No support||(Yes)||No support||(Yes)|