Package Exports
- html-traits
- html-traits/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (html-traits) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
html-traits
Warning: This is alpha software and is highly experimental. Although it is meant to mimic built-in web components the API might change and not all the API may be implemented.
This library is meant to be similar to built-in web components which uses the
is attribute. This uses the traits HTML attribute and can handle multiple
traits to one element. It also can be used with any element as it doesn't
inherit the specific element but the element is passed into the class'
constructor.
What are the advantages over web components?
- Composition over inheritance.
- Multiple traits to one element.
- Ordered traits.
- Built for progressive enhancement.
- No need for extra elements on your page just to get new runtime behavior.
- Cleaner HTML.