Skip to content

9.0.0

Compare
Choose a tag to compare
@heapwolf heapwolf released this 05 Mar 09:24
· 386 commits to master since this release

DESCRIPTION

This is a major release with breaking changes. Please read the following notes.

NEW FEATURES

  • Tonic is now backed by Web Components given that all major browsers finally support them.
  • A minified version will now be included in the package for each release.
  • Allows NodeList and HTMLCollection and NamedNodeMap (attributes) as values in this.html.
  • Adds property-spread to render function.
render () {
  this.html`<div ...${o}></div>`
}

BREAKING CHANGES

  • Component tag names must be compliant with web-component spec. Basically this just means they require at least one dash, so x-foo, foo-bar, quxx-z, are valid. But not foobear, for example.
  • this.children property exists still, but you should use childElements for only element nodes (a collection that does not contain non-element nodes) and you should use childNodes, a collection of all/any nodes (this includes whitespace/text-nodes, etc).
render () {
  this.html`
    <div>
      ${this.childNodes}
    </div>
  `
}