Closed chrisguttandin closed 3 years ago
LGTM 👍 Incremental changes are perfect. They are much easier to review :)
Thanks @chrisguttandin
Hi @bezoerb, now that I began implementing the functionality to update a possible CSP meta tag, I noticed that there is another branch in the codebase which looks very similar to the one I modified.
https://github.com/bezoerb/inline-critical/blob/master/index.js#L131
Do I need to update that one as well?
Nope :) The link element here is created in line 108 so there shouldn't be any integrity attribute here. I think in this case the integrity attribute needs to be calculated
This PR is making sure that an existing integrity attribute is copied over to a newly created preload tag.
It's a first step towards supporting CSP tags. I thought it makes sense to make incremental changes. @bezoerb please let me know if you think I should better make a PR with all changes instead or if anything needs to be changed here.