版博士V2.0程序
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
1.3 KiB

  1. import INode from '../node/INode';
  2. import IChildNode from './IChildNode';
  3. /**
  4. * Child node utility.
  5. */
  6. export default class ChildNodeUtility {
  7. /**
  8. * Removes the node from its parent.
  9. *
  10. * @param childNode Child node.
  11. */
  12. static remove(childNode: IChildNode): void;
  13. /**
  14. * The Node.replaceWith() method replaces this Node in the children list of its parent with a set of Node or DOMString objects.
  15. *
  16. * @param childNode Child node.
  17. * @param nodes List of Node or DOMString.
  18. */
  19. static replaceWith(childNode: IChildNode, ...nodes: (INode | string)[]): void;
  20. /**
  21. * Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.
  22. *
  23. * @param childNode Child node.
  24. * @param nodes List of Node or DOMString.
  25. */
  26. static before(childNode: IChildNode, ...nodes: (string | INode)[]): void;
  27. /**
  28. * Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes.
  29. *
  30. * @param childNode Child node.
  31. * @param nodes List of Node or DOMString.
  32. */
  33. static after(childNode: IChildNode, ...nodes: (string | INode)[]): void;
  34. }