3 ms·
Complex frameworks have historically made up for a lack of capabilities, starting with the lack of a component model and composition facilities. This is changi
by spankalee 10y ago
Complex frameworks have historically made up for a lack of capabilities, starting with the lack of a component model and composition facilities.
This is changing for the better with web components. Now you'll be able to have just a `<script>` tag and define a component and use it in markup. It'll be even simpler than jQuery, and saner at the same time.
So you can do this:
<script>
class MyElement extends HTMLElement {
constructor() {
super();
console.log('yay!');
}
}
customElements.define('my-element', MyElement);
</script>
<my-element></my-element>
And use no external libraries at all.