UNPKG

foxts

Version:

Opinionated collection of common TypeScript utils by @SukkaW

12 lines (10 loc) 468 B
/** * if you are trying to empty an Element, use `emptyElement` method instead, it will opt-in more performant method on modern browsers. */ declare function emptyNode(node: Node): void; declare const emptyElementModern: (element: Element) => void; /** * Use `Element.replaceChildren` if available, otherwise fall back to removing each child node. */ declare const emptyElement: (element: Element) => void; export { emptyElement, emptyElementModern, emptyNode };