Allow a form in shadow DOM to be the form owner of light DOM fields #10220
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
topic: custom elements
Relates to custom elements (as defined in DOM and HTML)
topic: forms
topic: shadow
Relates to shadow trees (as defined in DOM)
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.Anything else?
No response
The text was updated successfully, but these errors were encountered: