Closed
Description
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