Class SVGElementBuilder<T>

This will escape all input strings so it is safe by default. Pass a function that returns a string to explicitly indicate that you want the string treated as innerHTML.

Type Parameters

  • T extends string & keyof SVGElementTagNameMap

Hierarchy (view full)

Constructors

  • Type Parameters

    • T extends "symbol" | "filter" | "set" | "stop" | "view" | "clipPath" | "marker" | "mask" | "a" | "script" | "style" | "title" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "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" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use"

    Parameters

    Returns SVGElementBuilder<T>

Properties

attrs: object = {}
children: IElementChild[] = []
components: IComponent[] = []
nsAttrs: object = {}
parents?: Set<IBuilder> = ...
props: object = {}
tag: T

Methods