UNPKG

1.47 kBTypeScriptView Raw
1import type { ChildNode, ParentNode } from "domhandler";
2/**
3 * Remove an element from the dom
4 *
5 * @category Manipulation
6 * @param elem The element to be removed
7 */
8export declare function removeElement(elem: ChildNode): void;
9/**
10 * Replace an element in the dom
11 *
12 * @category Manipulation
13 * @param elem The element to be replaced
14 * @param replacement The element to be added
15 */
16export declare function replaceElement(elem: ChildNode, replacement: ChildNode): void;
17/**
18 * Append a child to an element.
19 *
20 * @category Manipulation
21 * @param parent The element to append to.
22 * @param child The element to be added as a child.
23 */
24export declare function appendChild(parent: ParentNode, child: ChildNode): void;
25/**
26 * Append an element after another.
27 *
28 * @category Manipulation
29 * @param elem The element to append after.
30 * @param next The element be added.
31 */
32export declare function append(elem: ChildNode, next: ChildNode): void;
33/**
34 * Prepend a child to an element.
35 *
36 * @category Manipulation
37 * @param parent The element to prepend before.
38 * @param child The element to be added as a child.
39 */
40export declare function prependChild(parent: ParentNode, child: ChildNode): void;
41/**
42 * Prepend an element before another.
43 *
44 * @category Manipulation
45 * @param elem The element to prepend before.
46 * @param prev The element be added.
47 */
48export declare function prepend(elem: ChildNode, prev: ChildNode): void;
49//# sourceMappingURL=manipulation.d.ts.map
\No newline at end of file