When reviewing the output of the RewriteAmpUrls transformer, I noticed that the nomodule scripts lacked the crossorigin=anonymous attribute like the the module scripts did. This makes them consistent.
Aside: It seems to be that there should also be a transformer config option for whether crossorigin=anonymous should be added in the first place. Sure it should be added by default, but for some use cases it is not good to add, namely when you are wanting to opt-in to beta/experimental channels via cookie (cf. https://github.com/ampproject/amp-wp/issues/4600). Nevertheless, for this to be feasible the validator would need to make crossorigin=anonymous non-mandatory for the modulepreload link and all module scripts. I assume the cookie-based opt-in works for modules.
When reviewing the output of the
RewriteAmpUrls
transformer, I noticed that thenomodule
scripts lacked thecrossorigin=anonymous
attribute like the themodule
scripts did. This makes them consistent.Aside: It seems to be that there should also be a transformer config option for whether
crossorigin=anonymous
should be added in the first place. Sure it should be added by default, but for some use cases it is not good to add, namely when you are wanting to opt-in to beta/experimental channels via cookie (cf. https://github.com/ampproject/amp-wp/issues/4600). Nevertheless, for this to be feasible the validator would need to makecrossorigin=anonymous
non-mandatory for themodulepreload
link and all module scripts. I assume the cookie-based opt-in works for modules.