MCPcopy
hub / github.com/qq15725/modern-screenshot / isSVGElementNode

Function isSVGElementNode

src/utils.ts:24–24  ·  view source on GitHub ↗
(node: Element)

Source from the content-addressed store, hash-verified

22// Element
23export const isElementNode = (node: Node): node is Element => node.nodeType === 1 // Node.ELEMENT_NODE
24export const isSVGElementNode = (node: Element): node is SVGElement => typeof (node as SVGElement).className === 'object'
25export const isSVGImageElementNode = (node: Element): node is SVGImageElement => node.tagName === 'image'
26export const isSVGUseElementNode = (node: Element): node is SVGUseElement => node.tagName === 'use'
27export const isHTMLElementNode = (node: Node): node is HTMLElement => isElementNode(node) && typeof (node as HTMLElement).style !== 'undefined' && !isSVGElementNode(node)

Callers 5

cloneNodeFunction · 0.90
getDefaultStyleFunction · 0.90
embedImageElementFunction · 0.90
domToForeignObjectSvgFunction · 0.90
isHTMLElementNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…