biotope / biotope-element

A web component
https://element.biotope.sh
15 stars 5 forks source link

Extend native HTML elements #94

Closed luke-m closed 5 years ago

luke-m commented 5 years ago

Is your feature request related to a problem? Please describe.

When building custom input elements, it's complicated to have them evaluated by native forms because native forms only read values of certain elements selected by TAG name (<input> and <select>). But because custom elements have different tag names by design, forms just ignore them completely.

Describe the solution you'd like

It would be hella dope to have custom elements that share the same tag name with native HTML elements so that they get recognized by form elements. There is already a solution to this in the customElements API - extending native elements. All the information is here: https://developers.google.com/web/fundamentals/web-components/customelements#extendhtml

I don't think this is possible with the current implementation of bioElement with hyperHTML. Or is it?

tiagomapmarques commented 5 years ago

Addressed by https://github.com/biotope/biotope-element/pull/116

jurekbarth commented 5 years ago

Merged in master. Released as beta 🎉