Web Components is a set of specs which let web developers leverage their HTML, CSS and JavaScript knowledge to build widgets that can be reused easily

Why web components suck : WebComponents

submited by
Style Pass
2021-07-05 19:00:09

Web Components is a set of specs which let web developers leverage their HTML, CSS and JavaScript knowledge to build widgets that can be reused easily and reliably.

Let's not beat around the bush, web components is a great idea (though arguably an obvious tech that should've been made long ago) but with a horrible implementation.

A component API that's much more useful can be easily implemented (albeit somewhat inefficiently) by overriding all built-in DOM creation and manipulation API methods so that they scan all attached and detached elements in order to create components, and have them receive attach/detach events. And as a bonus, this API also lets you register an attach/detach handler for any selector including for built-in tags, not only your registered component tags.

Use of this site constitutes acceptance of our User Agreement and Privacy Policy. © 2021 reddit inc. All rights reserved.

Leave a Comment