Skip to content

Split ElementTagNameMap and remove it #20134

Closed
@falsandtru

Description

@falsandtru

Some tag names of HTML and SVG are conflicted. So merging these two is wrong. ElementTagNameMap has to split into HTMLElementTagNameMap and SVGElementTagNameMap.

For example, a tag is defined in both HTML and SVG.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element
https://developer.mozilla.org/en-US/docs/Web/SVG/Element

So the result type of document.querySelector('a') is defined as HTMLAnchorElement by TypeScript, but the actual type is HTMLAnchorElement | SVGAElement.

related: #14783

Metadata

Metadata

Assignees

Labels

Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions