XHTML and SVG namespaces in createElementNS and getElementsByTagNameNS #7712
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Fixed
A PR has been merged for this issue
Help Wanted
You can do this
Milestone
When XHTML namespace is passed into
createElementNS
, aHTMLElement
should be returned. There has been a similar overload for SVG.When XHTML namespace is passed into
getElementsByTagNameNS
, aHTMLCollectionOf<HTMLElement>
should be returned. Similarly, when SVG namespace is passed intogetElementsByTagNameNS
, aHTMLCollectionOf<SVGElement>
should be returned.Also, according to the DOM Standard,
getElementsByTagName
,getElementsByTagNameNS
andgetElementsByClassName
should all returnHTMLCollection
. 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 forgetElementsByTagNameNS
.TypeScript Version:
1.8.5
The text was updated successfully, but these errors were encountered: