react-component / util

Common Utils For React Component
util.vercel.app
MIT License
622 stars 176 forks source link

【CSP once is not effective 】util/src/Dom/dynamicCSS injectCSS function with csp bug,Style.once is not effective #495

Open shentao1 opened 6 months ago

shentao1 commented 6 months ago

util/src/Dom/dynamicCSS injectCSS function ,Style.once only assigns attributes and is still blocked by CSP policies. Style.setAttribute should be used to set nonce to the dom tree. image The following example also illustrates that using. xx assignment does not reflect on the dom tree, and using setAttribute will reflect on the dom tree image

shentao1 commented 6 months ago

image This bug also exists here

dVerhees commented 6 months ago

I believe this is a duplicate of https://github.com/react-component/util/issues/392