News for hackers. Stuff that matters.
Re:Introducing Custom Elements by Touche on Saturday November 19, 2016 @01:30PM (#12994810)
Distribute a widget that others can use, or that you can use more easily in other contexts.
Re:Introducing Custom Elements by dfabulich on Saturday November 19, 2016 @01:35PM (#12994836)
What? You can distribute widgets with JavaScript (and Custom Elements require JS). So what was the benefit, again?
Re:Introducing Custom Elements by Touche on Saturday November 19, 2016 @01:37PM (#12994851)
This one is easier and more universal than the other approaches. There's not setup involved like:

   $("#foo").myWidget();
You just put the markup on the page and include the JavaScript:

  <my-widget></my-widget>
And of course, you could do querySelector before that existed but that doesn't mean there wasn't benefit to it being native.