DEV Community

Discussion on: Web Components — the right way.

 
equinusocio profile image
Mattia Astorino • Edited

Recreating (as you describe) means building a new element with a (potentially) different behavior set, running the danger to not really behave like an extended element, wouldn't it?

Yes, until we can fully extend built-in elements each ”recreated" custom element should behave the same as the native one.. and that's why is hard to think, hard to do and generally a bad practice. I think it's really hard to find some built-in element that needs to be recreated... about elis'x autosize textarea, they added a funcionality but they can avoid using a <textarea> element and use a content-editable element (recreating the textarea behavior and so on...)