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

56 lines
1.7 KiB

  1. import IElement from '../element/IElement';
  2. import INode from '../node/INode';
  3. export default interface IDocumentFragment extends INode {
  4. readonly childElementCount: number;
  5. readonly firstElementChild: IElement;
  6. readonly lastElementChild: IElement;
  7. readonly children: IElement[];
  8. /**
  9. * Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.
  10. *
  11. * @param nodes List of Node or DOMString.
  12. */
  13. append(...nodes: (INode | string)[]): void;
  14. /**
  15. * Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.
  16. *
  17. * @param nodes List of Node or DOMString.
  18. */
  19. prepend(...nodes: (INode | string)[]): void;
  20. /**
  21. * Query CSS Selector to find matching node.
  22. *
  23. * @param selector CSS selector.
  24. * @returns Matching element.
  25. */
  26. querySelector(selector: string): IElement;
  27. /**
  28. * Query CSS selector to find matching nodes.
  29. *
  30. * @param selector CSS selector.
  31. * @returns Matching elements.
  32. */
  33. querySelectorAll(selector: string): IElement[];
  34. /**
  35. * Replaces the existing children of a node with a specified new set of children.
  36. *
  37. * @param nodes List of Node or DOMString.
  38. */
  39. replaceChildren(...nodes: (INode | string)[]): void;
  40. /**
  41. * Returns an element by ID.
  42. *
  43. * @param id ID.
  44. * @returns Matching element.
  45. */
  46. getElementById(id: string): IElement;
  47. /**
  48. * Clones a node.
  49. *
  50. * @override
  51. * @param [deep=false] "true" to clone deep.
  52. * @returns Cloned node.
  53. */
  54. cloneNode(deep: boolean): IDocumentFragment;
  55. }