- create<K>(name): Selection<ElementTagNameMap[K], undefined, null, undefined>
Type Parameters
K extends "symbol" | "filter" | "g" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "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" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap
Returns Selection<ElementTagNameMap[K], undefined, null, undefined>
- create<NewGElement>(name): Selection<NewGElement, undefined, null, undefined>
Returns Selection<NewGElement, undefined, null, undefined>
Given the specified element name, returns a single-element selection containing a detached element of the given name in the current document.