-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTMLFormElement elements does not contain form-associated CustomElements when name attribute is shared #5891
Comments
This is working as designed. RadioNodeList is a specific legacy API used for To get a list of all custom elements with the same name, you can use |
Hmm, although I guess maybe per spec this is supposed to work. (Even though I would have rather we disallowed it.) In that case you've probably found a Chromium bug, which I suggest filing at https://crbug.com/new. |
@domenic thanks for your feedback. The native input fields in my example have I'll (also) report it as a potential Chromium bug. |
It looks like per spec it's supposed to return a list of all listed elements, including custom elements. I wish we had excluded it though. Legacy features like RadioNodeList should be quarantined and not allowed to interact with new features like custom elements. Oh well. I'll close this since the spec works in the manner you prefer. |
Quoted from the form-element spec:
In my humble opinion there seems to be a difference between the spec and the behaviour or am I wrong? |
Correct. That's why it's a browser bug, because the browser does not match the spec. |
Crystal clear, I'll report it as a Chromium bug and this issue is indeed correctly closed. Thank you for the surprisingly fast feedback and support. |
@domenic wait, Chrome is the only browser that ships this. Why not change the standard if that's preferable? |
My first issue here, hopefully according to the guidelines...
I've noticed that the HTMLFormElement
elements
function does not contain my form associated CustomElements when thename
attribute is shared over multiple form-associated (custom) elements.When I request the form elements:
So far so good, but when I use the same name on all elements, only the native ones are returned in the HTMLFormControlsCollection.
When I request the form elements:
As you can see the RadioNodeList only contains the 2 native input elements. Is there something missing in my CustomElement described below or did I run into a bug?
The text was updated successfully, but these errors were encountered: