-
Notifications
You must be signed in to change notification settings - Fork 199
Description
See this comment.
We're trying to add nonces to
elm-css
-generated<style>
tags, and are running into an issue that is not resolved by #570.We're using
elm-form
'sForm.renderStyledHtml
, which callsHtml.Styled.Lazy.lazy4
, which callsVirtualDom.Styled.lazy4
, which callsVirtualDom.Styled.toUnstyled
.We need to use
toNonceUnstyled
to pass the nonce of course, but there's no way to do this currently even ifForm.renderStyledHtml
took an optionalnonce
: it usesHtml.Styled.Lazy
which does not expose any way of passing the nonce through to theVirtualDom.Styled
internals.Unless I'm missing something, I think for CSP nonce support we would need to add
Html.Styled.lazy*
andVirtualDom.Styled.lazy*
variants that take a nonce as argument (and calltoNonceUnstyled
internally).