Skip to content

Allow web components to bind to the parent form #7596

@chrisolsen

Description

@chrisolsen

Describe the problem

I am compiling the svelte components to web components and for some form components I need to be able to call the attachInternals() method on the HTMLElement instance to obtain a reference to later call the setFormValue method. Along with this there is a formAssociated static property that needs to be able to be set to true.

Describe the proposed solution

Have an additional option made available in the <svelte:options formAssociated={true} /> that would allow the formAssociated static prop to be set and would allow a reference to the HTMLElement be accessed allowing access to the attachInternals() method.

Alternatives considered

Without this feature generated web components can't be used to their full extent.

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions