Skip to content

createEl<K>

Import:

import 'obsidian-test-mocks/setup';

Signature:

function createEl(this: Node, tag: K, o: string | DomElementInfo | undefined, callback: ((el: HTMLElementTagNameMap[K]) => void) | undefined): HTMLElementTagNameMap[K]

Parameters:

ParameterTypeDescription
thisNode
tagK
ostring | DomElementInfo | undefined
callback((el: HTMLElementTagNameMap[K]) => void) | undefined

Returns: HTMLElementTagNameMap[K]