MCPcopy Create free account
hub / github.com/angular/components / cloneSvg

Function cloneSvg

src/material/icon/icon-registry.ts:732–734  ·  view source on GitHub ↗

Clones an SVGElement while preserving type information.

(svg: SVGElement)

Source from the content-addressed store, hash-verified

730
731/** Clones an SVGElement while preserving type information. */
732function cloneSvg(svg: SVGElement): SVGElement {
733 return svg.cloneNode(true) as SVGElement;
734}
735
736/** Returns the cache key to use for an icon namespace and name. */
737function iconKey(namespace: string, name: string) {

Callers 2

getSvgIconFromUrlMethod · 0.85
_getSvgFromConfigMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected