3 ms·
What? You can distribute widgets with JavaScript (and Custom Elements require JS). So what was the benefit, again?
by dfabulich 10y ago
What? You can distribute widgets with JavaScript (and Custom Elements require JS). So what was the benefit, again?
- Touche 10y agoThis 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.