Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: