Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: backport CSP support from lit/lit #1230

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andy-blum
Copy link

Reference Issue

#867

This PR backports the CSP support from lit/lit by adding nonce attributes to injected stylesheets with the value of window.litNonce. This should allow projects to use LitElement versions prior to 3.x.x with Safari and CSPs preventing unsafe inline styles.

@andy-blum
Copy link
Author

@justinfagnani any feedback on this or an estimate when it might be able to be merged in?

@andy-blum
Copy link
Author

@justinfagnani any chance you can take a look at this?

@justinfagnani
Copy link
Contributor

Yes, I can take a look

Any reason why you're still on lit-element 2.0?

@justinfagnani
Copy link
Contributor

We're going to want a link back to the original PR from here: https://github.com/lit/lit/pull/2134/files

@andy-blum we'll need to port over the test too

@andy-blum
Copy link
Author

@justinfagnani Seems like the test setup is different. Hopefully, this is at least on the right track?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants