HTMLFormControlsCollection does not have string accessor
As per the spec (https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection/namedItem), namedItem supports strings, but the accessor of HTMLFormControlsCollection is not updated to reflect this.
This might have come in since then: https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/master/baselines/dom.generated.d.ts#L6701-L6708
/** A collection of HTML form control elements. */
interface HTMLFormControlsCollection extends HTMLCollectionBase {
/**
* Returns the item with ID or name name from the collection.
*
* If there are multiple matching items, then a RadioNodeList object containing all those elements is returned.
*/
namedItem(name: string): RadioNodeList | Element | null;
}
@orta as far as I know, the indexers have always just been redirected to namedItem; for some reason, this is the only HTMLCollectionBase-derived class that doesn't also override the indexer. See https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#the-htmlformcontrolscollection-interface (which is supposedly where it appeared first in the spec) where the IDL indeed only mentions namedItem, but, below it it explains that the indexer redirects to it.