Skip to content

Commit 5f5ebdb

Browse files
author
falsandtru
committed
Add SVGElementTagNameMap
1 parent 718e339 commit 5f5ebdb

File tree

2 files changed

+55
-41
lines changed

2 files changed

+55
-41
lines changed

TS.fsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,11 +818,21 @@ module Emit =
818818
Pt.Printl "}"
819819
Pt.Printl ""
820820

821+
let EmitSVGElementTagNameMap () =
822+
Pt.Printl "interface SVGElementTagNameMap {"
823+
Pt.IncreaseIndent()
824+
for e in tagNameToEleName do
825+
if iNameToIDependList.ContainsKey e.Value && Seq.contains "SVGElement" iNameToIDependList.[e.Value] then
826+
Pt.Printl "\"%s\": %s;" (e.Key.ToLower()) e.Value
827+
Pt.DecreaseIndent()
828+
Pt.Printl "}"
829+
Pt.Printl ""
830+
821831
let EmitElementTagNameMap () =
822-
Pt.Printl "interface ElementTagNameMap extends HTMLElementTagNameMap {"
832+
Pt.Printl "interface ElementTagNameMap extends HTMLElementTagNameMap, SVGElementTagNameMap {"
823833
Pt.IncreaseIndent()
824834
for e in tagNameToEleName do
825-
if iNameToIDependList.ContainsKey e.Value && not (Seq.contains "HTMLElement" iNameToIDependList.[e.Value]) then
835+
if iNameToIDependList.ContainsKey e.Value && not (Seq.contains "HTMLElement" iNameToIDependList.[e.Value]) && not (Seq.contains "SVGElement" iNameToIDependList.[e.Value]) then
826836
Pt.Printl "\"%s\": %s;" (e.Key.ToLower()) e.Value
827837
Pt.DecreaseIndent()
828838
Pt.Printl "}"
@@ -1516,6 +1526,7 @@ module Emit =
15161526

15171527
if flavor <> Worker then
15181528
EmitHTMLElementTagNameMap()
1529+
EmitSVGElementTagNameMap()
15191530
EmitElementTagNameMap()
15201531
EmitElementListTagNameMap()
15211532
EmitNamedConstructors()

baselines/dom.generated.d.ts

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14922,27 +14922,12 @@ interface HTMLElementTagNameMap {
1492214922
"xmp": HTMLPreElement;
1492314923
}
1492414924

14925-
interface ElementTagNameMap extends HTMLElementTagNameMap {
14926-
"abbr": HTMLElement;
14927-
"acronym": HTMLElement;
14928-
"address": HTMLElement;
14929-
"article": HTMLElement;
14930-
"aside": HTMLElement;
14931-
"b": HTMLElement;
14932-
"bdo": HTMLElement;
14933-
"big": HTMLElement;
14934-
"center": HTMLElement;
14925+
interface SVGElementTagNameMap {
1493514926
"circle": SVGCircleElement;
14936-
"cite": HTMLElement;
1493714927
"clippath": SVGClipPathElement;
14938-
"code": HTMLElement;
14939-
"dd": HTMLElement;
1494014928
"defs": SVGDefsElement;
1494114929
"desc": SVGDescElement;
14942-
"dfn": HTMLElement;
14943-
"dt": HTMLElement;
1494414930
"ellipse": SVGEllipseElement;
14945-
"em": HTMLElement;
1494614931
"feblend": SVGFEBlendElement;
1494714932
"fecolormatrix": SVGFEColorMatrixElement;
1494814933
"fecomponenttransfer": SVGFEComponentTransferElement;
@@ -14967,57 +14952,75 @@ interface ElementTagNameMap extends HTMLElementTagNameMap {
1496714952
"fespotlight": SVGFESpotLightElement;
1496814953
"fetile": SVGFETileElement;
1496914954
"feturbulence": SVGFETurbulenceElement;
14970-
"figcaption": HTMLElement;
14971-
"figure": HTMLElement;
1497214955
"filter": SVGFilterElement;
14973-
"footer": HTMLElement;
1497414956
"foreignobject": SVGForeignObjectElement;
1497514957
"g": SVGGElement;
14976-
"header": HTMLElement;
14977-
"hgroup": HTMLElement;
14978-
"i": HTMLElement;
1497914958
"image": SVGImageElement;
14980-
"kbd": HTMLElement;
14981-
"keygen": HTMLElement;
1498214959
"line": SVGLineElement;
1498314960
"lineargradient": SVGLinearGradientElement;
14984-
"mark": HTMLElement;
1498514961
"marker": SVGMarkerElement;
1498614962
"mask": SVGMaskElement;
1498714963
"metadata": SVGMetadataElement;
14988-
"nav": HTMLElement;
14989-
"nobr": HTMLElement;
14990-
"noframes": HTMLElement;
14991-
"noscript": HTMLElement;
1499214964
"path": SVGPathElement;
1499314965
"pattern": SVGPatternElement;
14994-
"plaintext": HTMLElement;
1499514966
"polygon": SVGPolygonElement;
1499614967
"polyline": SVGPolylineElement;
1499714968
"radialgradient": SVGRadialGradientElement;
1499814969
"rect": SVGRectElement;
14970+
"stop": SVGStopElement;
14971+
"svg": SVGSVGElement;
14972+
"switch": SVGSwitchElement;
14973+
"symbol": SVGSymbolElement;
14974+
"text": SVGTextElement;
14975+
"textpath": SVGTextPathElement;
14976+
"tspan": SVGTSpanElement;
14977+
"use": SVGUseElement;
14978+
"view": SVGViewElement;
14979+
}
14980+
14981+
interface ElementTagNameMap extends HTMLElementTagNameMap, SVGElementTagNameMap {
14982+
"abbr": HTMLElement;
14983+
"acronym": HTMLElement;
14984+
"address": HTMLElement;
14985+
"article": HTMLElement;
14986+
"aside": HTMLElement;
14987+
"b": HTMLElement;
14988+
"bdo": HTMLElement;
14989+
"big": HTMLElement;
14990+
"center": HTMLElement;
14991+
"cite": HTMLElement;
14992+
"code": HTMLElement;
14993+
"dd": HTMLElement;
14994+
"dfn": HTMLElement;
14995+
"dt": HTMLElement;
14996+
"em": HTMLElement;
14997+
"figcaption": HTMLElement;
14998+
"figure": HTMLElement;
14999+
"footer": HTMLElement;
15000+
"header": HTMLElement;
15001+
"hgroup": HTMLElement;
15002+
"i": HTMLElement;
15003+
"kbd": HTMLElement;
15004+
"keygen": HTMLElement;
15005+
"mark": HTMLElement;
15006+
"nav": HTMLElement;
15007+
"nobr": HTMLElement;
15008+
"noframes": HTMLElement;
15009+
"noscript": HTMLElement;
15010+
"plaintext": HTMLElement;
1499915011
"rt": HTMLElement;
1500015012
"ruby": HTMLElement;
1500115013
"s": HTMLElement;
1500215014
"samp": HTMLElement;
1500315015
"section": HTMLElement;
1500415016
"small": HTMLElement;
15005-
"stop": SVGStopElement;
1500615017
"strike": HTMLElement;
1500715018
"strong": HTMLElement;
1500815019
"sub": HTMLElement;
1500915020
"sup": HTMLElement;
15010-
"svg": SVGSVGElement;
15011-
"switch": SVGSwitchElement;
15012-
"symbol": SVGSymbolElement;
15013-
"text": SVGTextElement;
15014-
"textpath": SVGTextPathElement;
15015-
"tspan": SVGTSpanElement;
1501615021
"tt": HTMLElement;
1501715022
"u": HTMLElement;
15018-
"use": SVGUseElement;
1501915023
"var": HTMLElement;
15020-
"view": SVGViewElement;
1502115024
"wbr": HTMLElement;
1502215025
}
1502315026

0 commit comments

Comments
 (0)