I was on bootstrap's site, and I recently noticed that their CDN links contained an integrity attribute with an SHA-384 key.
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
I assume that is meant to be a way to verify the script source, but moreso I was wondering how it's used and if this is part of any spec?
Furthermore, does this only work with script src's or can it work with any non-same-origin source?