-
Filter out booleans in the html helper.
Previously only
null
andundefined
were filtered out. Now bothtrue
andfalse
are never rendered. With this change it's now possible to use the&&
operator for conditionals:html`${is_fetching && PleaseWait()}`
Keep in mind that not all falsy values are filtered out. Most notably,
0
is still a valid interpolation value. As a consequence please be mindful when using numbers for the predicate. The following example will actually render0
.html`${items.length && ItemList()}`
You can fix this by explicitly using a comparison which returns a boolean which arguably also reads better:
html`${items.length > 0 && ItemList()}`
-
Dispatch the render event on roots. (#15)
The render event provides a hook to add custom logic after the render is complete. It allows to restore focus, selection and caret positions after render.
-
Filter out null and undefined interpolations in the html helper. (#8)
-
Ignore tests and examples in npm. (#11)
This is the first release to be tracked in the changelog.