Skip to content

UseAppend

katanakit-js / useAppend

function useAppend(target, child): void;

Defined in: infrastructure/dom/dom.service.ts:455

Appends a child element to the target parent.

Parameter Type Description
target string | Element A CSS selector string or an Element instance (the parent).
child string | Element A CSS selector string or an Element instance (the child).

void

const item = useCreateElement("li");
useSetText(item, "New item");
useAppend("ul.list", item);