Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

create

Given the specified element name, returns a single-element selection containing a detached element of the given name in the current document.

function create<K extends keyof ElementTagNameMap>(name: K): Selection<ElementTagNameMap[K], undefined, null, undefined>;
function create<NewGElement extends Element>(name: string): Selection<NewGElement, undefined, null, undefined>;
§
create<K extends keyof ElementTagNameMap>(name: K): Selection<ElementTagNameMap[K], undefined, null, undefined>
[src]

Given the specified element name, returns a single-element selection containing a detached element of the given name in the current document.

§Type Parameters

§
K extends keyof ElementTagNameMap
[src]

§Parameters

§
name: K
[src]

tag name of the element to be added.

§Return Type

§
Selection<ElementTagNameMap[K], undefined, null, undefined>
[src]
§
create<NewGElement extends Element>(name: string): Selection<NewGElement, undefined, null, undefined>
[src]

Given the specified element name, returns a single-element selection containing a detached element of the given name in the current document.

§Type Parameters

§
NewGElement extends Element
[src]

§Parameters

§
name: string
[src]

Tag name of the element to be added. See "namespace" for details on supported namespace prefixes, such as for SVG elements.

§Return Type

§
Selection<NewGElement, undefined, null, undefined>
[src]