UseAppend
katanakit-js / useAppend
Function: useAppend()
Section titled “Function: useAppend()”function useAppend(target, child): void;Defined in: infrastructure/dom/dom.service.ts:455
Appends a child element to the target parent.
Parameters
Section titled “Parameters”| 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). |
Returns
Section titled “Returns”void
Example
Section titled “Example”const item = useCreateElement("li");useSetText(item, "New item");useAppend("ul.list", item);