-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
What problem are you trying to solve?
I want to create a custom element, <ui-form>
, which has or wraps form functionality.
What solutions exist today?
<form is="my-custom-thing">
, but WebKit opposes this.
How would you solve it?
Assuming that WebKit will not change their position:
My <ui-form>
could create a shadow root which contains <form><slot></slot></form>
.
However, at present (although it isn't clear from the algorithm), shadow boundaries are not crossed when associating fields with forms.
Instead, the algorithm could be updated to cross-shadow boundaries. For compatibility, the form must opt-in to being considered when crossing shadow boundaries: <form allowcrossshadowboundarypleasethankyou>
. There may be better names.
Or, instead of that, provide a way to allow a custom element to act like a form itself, similar to how custom elements can become form associated.
Anything else?
No response