Option to add nonce value to style tag of vue3 web components #6530
Labels
🍰 p2-nice-to-have
Priority 2: this is not breaking anything but nice to have it addressed.
has PR
A pull request has already been submitted to solve the issue
scope: custom elements
✨ feature request
New feature or request
What problem does this feature solve?
When I create web components via custom elements in vue3 (as described here: https://vuejs.org/guide/extras/web-components.html#building-custom-elements-with-vue), the styles are loaded directly into the shadow dom with a <style> tag. In order to meet content security policies, I would need to include a nonce value to this style tag when building the web component. Otherwise the styles are rejected with the following error message:
It would be great, if a nonce value could be applied to the style tags while building the
What does the proposed API look like?
Add a nonce parameter to the _applyStyle method in apiCustomElement.ts:
The text was updated successfully, but these errors were encountered: