Skip to content

document.getElementsByName should return NodeListOf<HTMLElement> #7709

Closed
@FranklinWhale

Description

@FranklinWhale

According to the HTML Specification, document.getElementsByName applies only to HTML elements that have a name attribute, unlike document.getElementById, document.getElementsByTagName and document.getElementsByClassName which are defined in the core DOM specification. Therefore, document.getElementsByName should return NodeListOf<HTMLElement> instead of NodeListOf<Element>.

TypeScript Version:

1.8.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions