3 ms·
> You can create reusable UI widgets that are usable without the user knowing how they were written with an element like > <div class="FrameworkName_imageCarous
by om2 10y ago
> You can create reusable UI widgets that are usable without the user knowing how they were written with an element like
> <div class="FrameworkName_imageCarousel" ...> also, and your
> client library handles FrameworkName_imageCarousel without you needing to know how that is done.
With all frameworks I know of, this won't work for elements dynamically added to the DOM after the start of your application. Not only document.createElement, but even if you insert chunks of markup using innerHTML or the like.
Sometimes there is a framework-specific call to do the right thing, but then you're back to needing to know how an element is implemented.
For Custom Elements, it really is as simple as just inserting them. You don't have to run any script code to make them do what they do.
- bryanrasmussen 10y agoOk thanks, now I see a benefit - not sure if I consider it enough of a benefit for creating what I would consider to be awful interop problems but I can see a benefit.