Skip to content

XHTML and SVG namespaces in createElementNS and getElementsByTagNameNS #7712

Closed
@FranklinWhale

Description

@FranklinWhale

When XHTML namespace is passed into createElementNS, a HTMLElement should be returned. There has been a similar overload for SVG.

When XHTML namespace is passed into getElementsByTagNameNS, a HTMLCollectionOf<HTMLElement> should be returned. Similarly, when SVG namespace is passed into getElementsByTagNameNS, a HTMLCollectionOf<SVGElement> should be returned.

Also, according to the DOM Standard, getElementsByTagName, getElementsByTagNameNS and getElementsByClassName should all return HTMLCollection. Edge, Firefox and Chrome all follow the standard.

I note that there are lots of overloads for getElementsByTagName. I am not sure whether I should do the same manually for getElementsByTagNameNS.

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