That lead to less code, but also you are more limited. As i said, depends on your needings and what you want to build. Another thing that differs from inherit using is, and write a complete element is the presence of the Shadow DOM. In my case, i dont have a shadow DOM. Web Components can have a "scoped sub-DOM" inside your original DOM. That lead to pros and cons either. See:
That lead to less code, but also you are more limited. As i said, depends on your needings and what you want to build. Another thing that differs from inherit using
is
, and write a complete element is the presence of the Shadow DOM. In my case, i dont have a shadow DOM. Web Components can have a "scoped sub-DOM" inside your original DOM. That lead to pros and cons either. See:developer.mozilla.org/en-US/docs/W...
In my case i dont have a shadow DOM, the elements are on the same level as all others.