google / WebFundamentals

Former git repo for WebFundamentals on developers.google.com
Apache License 2.0
13.85k stars 2.57k forks source link

Web components with CSP #8817

Open Dreamsorcerer opened 4 years ago

Dreamsorcerer commented 4 years ago

Page Affected: https://developers.google.com/web/fundamentals/web-components/shadowdom

What needs to be done?

With all these explanations about web components, shadow DOM etc., there is a suspicious lack of any mention about CSPs. I'm just not understanding how these proposed web components can work well with any kind of reasonable CSP.

Surely all the CSS shown in the examples would not run because they are inline CSS. Therefore, the options I can see are: