Netflix / x-element

A dead simple starting point for custom elements.
Apache License 2.0
28 stars 12 forks source link

Support Form-Associated Custom Elements #83

Open theengineear opened 3 years ago

theengineear commented 3 years ago

Form-Associated Custom Elements have been implemented in Chrome 77+ (no other browsers yet though). Form controls have different behaviors and needs compared to most other Custom Elements we're used to working with.

Here's a short rundown of things we need to keep in mind:

It's also important to put bounds on what we want and need from XElement — perhaps custom form control authorship is nuanced enough that attempting to support it would ultimately make XElement less useful for the other 99% of cases we use it for! It's completely possible to write a form control from scratch using vanilla JS.

References:

Form Participation API Explained Chrome Platform Status Mozilla Bug WHATWG Specification

theengineear commented 3 years ago

👋 — Just opening up this issue to serve as a reference while we start to think about form-associated custom elements.