-
Notifications
You must be signed in to change notification settings - Fork 47
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
diffhtml/lite: innerHTML(someNode, "only text")
fails
#267
Comments
The lite version does not include an HTML parser, so you will need to precompile the string ahead of time using the Babel plugin. Alternatively, you can use innerHTML(someNode, createTree('#text', 'Some text')); |
Alright, that makes some sense to me. My use-case for diffhtml is to update a HTMLDivElement's I don't need synthetic events, components, etc - what would you suggest as a direction for me? Is there another library that you're aware of that will diff actual DOM nodes against an innerHTML string and/or a VDom tree? Your library was the only one I found from some cursory Googling. The other thing on my wishlist is a way to turn off MutationObserver, since I will only call Thanks 😃 |
|
I am trying to use innerHTML to update a DOM node to contain the given text. With
innerHTML
, this fails with the following DOMException:Browser: Chrome
Package: diffhtml@1.0.0-beta.27
Import: diffhtml/lite
This works fine with
diffhtml
.The text was updated successfully, but these errors were encountered: