Preparation Code Preparation HTML (this will be inserted in the <body>
of a valid HTML5 document in standards mode) (useful when testing DOM operations or including libraries)
Setup JS const nonTextSvgTagNames = [
'altGlyph' ,
'altGlyphDef' ,
'altGlyphItem' ,
'animate' ,
'animateColor' ,
'animateMotion' ,
'animateTransform' ,
'animation' ,
'audio' ,
'canvas' ,
'circle' ,
'clipPath' ,
'color-profile' ,
'cursor' ,
'defs' ,
'discard' ,
'ellipse' ,
'feBlend' ,
'feColorMatrix' ,
'feComponentTransfer' ,
'feComposite' ,
'feConvolveMatrix' ,
'feDiffuseLighting' ,
'feDisplacementMap' ,
'feDistantLight' ,
'feDropShadow' ,
'feFlood' ,
'feFuncA' ,
'feFuncB' ,
'feFuncG' ,
'feFuncR' ,
'feGaussianBlur' ,
'feImage' ,
'feMerge' ,
'feMergeNode' ,
'feMorphology' ,
'feOffset' ,
'fePointLight' ,
'feSpecularLighting' ,
'feSpotLight' ,
'feTile' ,
'feTurbulence' ,
'filter' ,
'font' ,
'font-face' ,
'font-face-format' ,
'font-face-name' ,
'font-face-src' ,
'font-face-uri' ,
'foreignObject' ,
'g' ,
'glyph' ,
'glyphRef' ,
'handler' ,
'hkern' ,
'iframe' ,
'image' ,
'line' ,
'linearGradient' ,
'listener' ,
'marker' ,
'mask' ,
'metadata' ,
'missing-glyph' ,
'mpath' ,
'path' ,
'pattern' ,
'polygon' ,
'polyline' ,
'prefetch' ,
'radialGradient' ,
'rect' ,
'script' ,
'set' ,
'solidColor' ,
'stop' ,
'style' ,
'svg' ,
'switch' ,
'symbol' ,
'tbreak' ,
'textPath' ,
'tref' ,
'unknown' ,
'use' ,
'video' ,
'view' ,
'vkern'
]
nonTextSvgTagNamesObj = Object .fromEntries (nonTextSvgTagNames.map (n => [n, true ]));
const entries = Array .from ({length : 10_000 }, (v, i ) => nonTextSvgTagNames[i % nonTextSvgTagNames.length ])
Teardown JS