Skip to content

XHTML and SVG namespaces in createElementNS and getElementsByTagNameNS #7712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
FranklinWhale opened this issue Mar 28, 2016 · 0 comments
Closed
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

Comments

@FranklinWhale
Copy link

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

@mhegazy mhegazy added Bug A bug in TypeScript Help Wanted You can do this Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Mar 28, 2016
@mhegazy mhegazy added this to the Community milestone Mar 28, 2016
@mhegazy mhegazy modified the milestones: TypeScript 2.0, Community Apr 27, 2016
@zhengbli zhengbli added Fixed A PR has been merged for this issue and removed Fixed in TSJS repo labels Apr 27, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

3 participants