public_library_map/node_modules/domutils/lib/manipulation.d.ts

49 lines
1.4 KiB
TypeScript
Raw Normal View History

2022-09-03 17:12:22 +10:00
import type { ChildNode, Element } from "domhandler";
2021-11-24 19:46:47 +11:00
/**
* Remove an element from the dom
*
2022-09-03 17:12:22 +10:00
* @category Manipulation
2021-11-24 19:46:47 +11:00
* @param elem The element to be removed
*/
2022-09-03 17:12:22 +10:00
export declare function removeElement(elem: ChildNode): void;
2021-11-24 19:46:47 +11:00
/**
* Replace an element in the dom
*
2022-09-03 17:12:22 +10:00
* @category Manipulation
2021-11-24 19:46:47 +11:00
* @param elem The element to be replaced
* @param replacement The element to be added
*/
2022-09-03 17:12:22 +10:00
export declare function replaceElement(elem: ChildNode, replacement: ChildNode): void;
2021-11-24 19:46:47 +11:00
/**
* Append a child to an element.
*
2022-09-03 17:12:22 +10:00
* @category Manipulation
2021-11-24 19:46:47 +11:00
* @param elem The element to append to.
* @param child The element to be added as a child.
*/
2022-09-03 17:12:22 +10:00
export declare function appendChild(elem: Element, child: ChildNode): void;
2021-11-24 19:46:47 +11:00
/**
* Append an element after another.
*
2022-09-03 17:12:22 +10:00
* @category Manipulation
2021-11-24 19:46:47 +11:00
* @param elem The element to append after.
* @param next The element be added.
*/
2022-09-03 17:12:22 +10:00
export declare function append(elem: ChildNode, next: ChildNode): void;
2021-11-24 19:46:47 +11:00
/**
* Prepend a child to an element.
*
2022-09-03 17:12:22 +10:00
* @category Manipulation
2021-11-24 19:46:47 +11:00
* @param elem The element to prepend before.
* @param child The element to be added as a child.
*/
2022-09-03 17:12:22 +10:00
export declare function prependChild(elem: Element, child: ChildNode): void;
2021-11-24 19:46:47 +11:00
/**
* Prepend an element before another.
*
2022-09-03 17:12:22 +10:00
* @category Manipulation
2021-11-24 19:46:47 +11:00
* @param elem The element to prepend before.
* @param prev The element be added.
*/
2022-09-03 17:12:22 +10:00
export declare function prepend(elem: ChildNode, prev: ChildNode): void;
2021-11-24 19:46:47 +11:00
//# sourceMappingURL=manipulation.d.ts.map