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

Allow to specify extra attribute in getScriptTags #210

Merged
merged 3 commits into from
Jan 22, 2019

Conversation

nchaulet
Copy link
Contributor

@nchaulet nchaulet commented Jan 22, 2019

Summary

When you using loadable components server side
I want to be able to provide extra attributes to generated script tags, especially a nonce attribute used for Content-Security-Policy.

Test plan

I added a small test on how you can use this new extraProps.

@gregberge
Copy link
Owner

Hello @nchaulet, thanks for your PR. I think it is a good idea! But I would like to have it on all methods available. Having it on getScriptTags and not on getScriptElements is pretty confusing. Same on style methods. Could you generalize it?

@nchaulet
Copy link
Contributor Author

Sure I am going to add it

@gregberge
Copy link
Owner

Thanks, one last thing, can you update the documentation? Also should we add it to getStyleXXX methods?

@nchaulet
Copy link
Contributor Author

Yes I am going to update the doc, and add it to getStyle*

@gregberge gregberge merged commit 8a3d067 into gregberge:master Jan 22, 2019
@gregberge
Copy link
Owner

Thanks!

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.

2 participants