Changelog
[v0.7.0] - 2017-07-27
The way Snabbdom handles boolean attributes in the attributes module has been changed. Snabbdom no longer maintains a list of known boolean attributes. Not relying on such a list means that custom boolean attributes are supported, that performance is slightly better, and that the list doesn't have to be kept up to date.
Whether or not to set a boolean attribute is now determined by looking at the value specified for the attribute. If the value is a boolean (i.e. strictly equal to true
or false
) it will be handled as a boolean attribute. If you're currently setting boolean attributes with booleans then this change does not affect you.
h("div", {
attrs: {
foo: true, // will be set a boolean attribute since `true` is a boolean
bar: "baz" // will set a normal attribute
}
});
The example above will result in the HTML: <div foo bar="baz" />
. Even if bar
is actually a boolean attribute. So for instance h("input", { attrs: { required: 12 } })
will no longer set a boolean attribute correctly.
Previously h("input", { attrs: { required: 0 } })
would result in the HTML <input>
since required
was a know boolean attribute and 0
is falsey. Per the new behavior the HTML will be <input required="0">
. To accomidate for the change always give boolean values for boolean attributes.
toVNode
now handles DocumentFragment
which makes it possible to patch into a fragment. #320. Thanks to @staltz.VNode
key property can be undefined
#290. Thanks to @yarom82.Changelog
[v0.6.9] - 2017-05-19
Changelog
[v0.6.8] - 2017-05-16
Changelog
[v0.6.6] - 2017-03-07
Changelog
[v0.6.5] - 2017-02-25
This is a patch version with a few bug fixes.
toVNode()
to handle text nodes correctly, https://github.com/snabbdom/snabbdom/issues/252. Thanks to @SteelfishChangelog
[v0.6.4] - 2017-02-09
This version adds some features such as support for comment nodes and better server-side/client-side rendering collaboration, besides some bug fixes.
Changelog
[v0.6.3] - 2017-01-16
Module
interface for TypeScript projects depending on snabbdom.