We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
example:
<img></img> <script type="module"> import { init, classModule, h } from 'https://cdn.skypack.dev/snabbdom' const patch = init([ classModule ]) const container = document.querySelector('img') const vnode = h('img', { class: { selected: 'true' } }) patch(container, vnode) </script>
When inspecting the DOM, you'll see this:
<img class="selected">
This is because snabbdom internally is not doing a strict compare against true, it'd doing a "truthy" check:
true
https://github.com/snabbdom/snabbdom/blob/e203f711c60fde72fa391f0a8e927df4a376204b/src/modules/class.ts#L23-L24
The text was updated successfully, but these errors were encountered:
0b992ea
Merge pull request #60 from mreinstein/master
4ab896c
make class inclusion check truthy to match snabbdom. fixes #59
No branches or pull requests
example:
When inspecting the DOM, you'll see this:
This is because snabbdom internally is not doing a strict compare against
true
, it'd doing a "truthy" check:https://github.com/snabbdom/snabbdom/blob/e203f711c60fde72fa391f0a8e927df4a376204b/src/modules/class.ts#L23-L24
The text was updated successfully, but these errors were encountered: