Skip to content

HTMLFormElement probably shouldn't have [OverrideBuiltins] #1562

@ajklein

Description

@ajklein

None of the HTMLCollections have [OverrideBuiltins], which means that HTMLFormControlsCollection doesn't. Thus the following snippet holds:

var form = document.createElement('form');
var input = document.createElement('input');
input.name = 'length';
form.appendChild(input);
console.log(form.length === input) // prints true
console.log(form.elements.length === 1) // also prints true

If there's value in not letting form control names override IDL attributes for HTMLFormControlsCollection, it seems like the same logic should apply to HTMLFormElement itself. Unless, of course, this is some legacy requirement.

@esprehn fyi

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