I am looking for a way to intercept the sub-resource integrity error messages that are generated when any integrity hash values are invalid. Is there any way to intercept these events using on-page JavaScript, or detect if a node has an invalid integrity
property?
For example these error messages:
None of the “sha384” hashes in the integrity attribute match the content of the sub-resource.
Failed to find a valid digest in the 'integrity' attribute for resource 'http://path/to/file' with computed SHA-256 integrity '[hash]'. The resource has been blocked.