manipulation.d.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import type { ChildNode, Element } from "domhandler";
  2. /**
  3. * Remove an element from the dom
  4. *
  5. * @category Manipulation
  6. * @param elem The element to be removed
  7. */
  8. export 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. */
  16. export declare function replaceElement(elem: ChildNode, replacement: ChildNode): void;
  17. /**
  18. * Append a child to an element.
  19. *
  20. * @category Manipulation
  21. * @param elem The element to append to.
  22. * @param child The element to be added as a child.
  23. */
  24. export declare function appendChild(elem: Element, 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. */
  32. export declare function append(elem: ChildNode, next: ChildNode): void;
  33. /**
  34. * Prepend a child to an element.
  35. *
  36. * @category Manipulation
  37. * @param elem The element to prepend before.
  38. * @param child The element to be added as a child.
  39. */
  40. export declare function prependChild(elem: Element, 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. */
  48. export declare function prepend(elem: ChildNode, prev: ChildNode): void;
  49. //# sourceMappingURL=manipulation.d.ts.map