版博士V2.0程序
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

65 satır
2.2 KiB

  1. import IHTMLCollection from '../element/IHTMLCollection';
  2. import IElement from '../element/IElement';
  3. import INode from '../node/INode';
  4. import INodeList from '../node/INodeList';
  5. export default interface IParentNode extends INode {
  6. readonly childElementCount: number;
  7. readonly firstElementChild: IElement;
  8. readonly lastElementChild: IElement;
  9. readonly children: IElement[];
  10. /**
  11. * Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.
  12. *
  13. * @param nodes List of Node or DOMString.
  14. */
  15. append(...nodes: (INode | string)[]): void;
  16. /**
  17. * Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.
  18. *
  19. * @param nodes List of Node or DOMString.
  20. */
  21. prepend(...nodes: (INode | string)[]): void;
  22. /**
  23. * Query CSS Selector to find matching node.
  24. *
  25. * @param selector CSS selector.
  26. * @returns Matching element.
  27. */
  28. querySelector(selector: string): IElement;
  29. /**
  30. * Query CSS selector to find matching nodes.
  31. *
  32. * @param selector CSS selector.
  33. * @returns Matching elements.
  34. */
  35. querySelectorAll(selector: string): INodeList<IElement>;
  36. /**
  37. * Returns an elements by class name.
  38. *
  39. * @param className Tag name.
  40. * @returns Matching element.
  41. */
  42. getElementsByClassName(className: string): IHTMLCollection<IElement>;
  43. /**
  44. * Returns an elements by tag name.
  45. *
  46. * @param tagName Tag name.
  47. * @returns Matching element.
  48. */
  49. getElementsByTagName(tagName: string): IHTMLCollection<IElement>;
  50. /**
  51. * Returns an elements by tag name and namespace.
  52. *
  53. * @param namespaceURI Namespace URI.
  54. * @param tagName Tag name.
  55. * @returns Matching element.
  56. */
  57. getElementsByTagNameNS(namespaceURI: string, tagName: string): IHTMLCollection<IElement>;
  58. /**
  59. * Replaces the existing children of a node with a specified new set of children.
  60. *
  61. * @param nodes List of Node or DOMString.
  62. */
  63. replaceChildren(...nodes: (INode | string)[]): void;
  64. }