Comment nodes when converted to VNode were lacking vnode.data and
vnode.elm, which in turn would break use cases with modules such as the
style module (Which assumed vnode.data to be defined). Since toVNode is
used as an initial step (e.g. for server-side rendered content), there
is no reason to not provide vnode.elm since that vnode may be used as
the "prevVNode" during patch. Also, because comment vnodes have the '!'
sel, most logic in snabbdom that detects a truthy sel will also assume a
truthy data field. It is easier to build the comment vnode with those
fields than to modify all the logic elsewhere in snabbdom.
PR #273
* Separate test blocks with newlines
* Add a 🔴 failing test that highlights the bug, and some other more detailed tests on thunk renderings
* Fix the bug ✅
* Correctly gitignore files in base directory
The existing configuration was ignoring the same filenames in subdirectories, for example `test/thunk.js`
* Remove newlines between test blocks
* Make tests titles more explicative
fixes#248
As snabbdom-jsx and snabbdom-jsx-babel hadn't had an update in 7 to 8 month and expecially the former has several bugs I would not advertise to use them.
Snabbdom-pragma works more reliable and thanks to a few PRs by me it works just as good with svg as it does with html
Cyclow is a new reactive frontend framework for JavaScript I've created. It uses Snabbdom. Please, consider add it to "Structuring applications" section. Thank you.
* Performance improvements for attribute patching:
- Avoid call to split and use a object lookup instead
- Simplify the code for `svg` name spaced attributes
* Fix typo and added missing property
* Fixing previous attribute ns assignment
* Refactor NS
* Add fast path for non namespaced elements
* Adding tests