I use subresource integrity for normal scripts on my page but currently not for JavaScript modules.
I assume that specifying the integrity of a module included with the script tag works like the following What are the integrity and crossorigin attributes?, just with the additional type="module"
. Is this correct?
How do I specify the integrity of modules included in other modules (e.g. with import * as blah from "blah.js";
)?
Is there a way to specify the integrity of these imports? Is it possible to specify them in all in one place in the HTML (for example in module preloads) so if a module deep down changes, not all intergrities of the modules using them change as well?