function / @typed/template

isSvgElement

Checks if a rendered node is an SVGElement.

Package version
1.0.0-beta.7
Category
Native element recognition
Since
1.0.0

Import

import { isSvgElement } from "@typed/template";

Signatures

export declare function isSvgElement(node: Rendered): node is SVGElement;

Why

SVG namespace behavior stays visible to renderer extensions.

Ownership and lifetime

The check reads the candidate’s native SVG identity without cloning, inserting, or retaining it.

Examples

import { isSvgElement } from "@typed/template/Wire"

const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg")
const result = isSvgElement(svg)

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source