Skip to content
0

katanakit-js / useAppend

Function: useAppend() ​

ts
function useAppend(target, child): void;

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

Appends a child element to the target parent.

Parameters ​

ParameterTypeDescription
targetstring | ElementA CSS selector string or an Element instance (the parent).
childstring | ElementA CSS selector string or an Element instance (the child).

Returns ​

void

Example ​

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

Released under the MIT License.