Skip to content

Add an option for form-associated custom-elements #114

Open
@Residu

Description

@Residu

Hi,
i actually trying to link my web-components to native forms.
It seems that the solution is in this API -> https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals

Actually this method works on my vue component but the internals_.form has this exception
"Uncaught DOMException: Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element."

This is caused because the static formAssociated = true; cant be set.

I'm not sure you can do anything on this, because i dont really understand on which scope this actually works.
Thanks for reading, cant wait to read your answers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions