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

Is there an equivalent of dangerouslySetInnerHTML? #13

Closed
TomasHubelbauer opened this issue Apr 23, 2018 · 3 comments
Closed

Is there an equivalent of dangerouslySetInnerHTML? #13

TomasHubelbauer opened this issue Apr 23, 2018 · 3 comments

Comments

@TomasHubelbauer
Copy link

I have an API which returns HTML fragments. Is it possible to place them in raw in PetitDOM?

@yelouafi
Copy link
Owner

No but should be added. it can be done by adding the innerHTML prop to this list

const DELAYED_PROPS = { selected: true, value: true, checked: true };

@TomasHubelbauer
Copy link
Author

I ended up setting innerHTML after patching the DOM, but this sounds like a better way. Thanks for the info.

@yelouafi
Copy link
Owner

should be fixed in v 0.2.0

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

No branches or pull requests

2 participants