Should the “DOM clobbering” note mention the id attribute as well? #6076
Labels
clarification
Standard could be clearer
good first issue
Ideal for someone new to a WHATWG standard or software project
Two years ago, the HTML Standard added a note about the issue of accidentally overriding built-in DOM properties with the
name
attribute on inputs.Commit: d661e87
Spec section: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attributes-common-to-form-controls
I have recently noticed that this issue exists with the
id
attribute as well. The following example is the same example as in the spec, except that I replacedinput.name
withinput.id
:Demo: https://jsbin.com/zehajuh/edit?js,console
This issue happens in all three major browser engines (Chrome, Safari, Firefox).
Should the spec note be updated to say “Avoid using the names of built-in form properties with the
name
andid
content attributes”?The text was updated successfully, but these errors were encountered: