Node.idl 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. interface Node : EventTarget {
  2. readonly attribute unsigned short nodeType;
  3. readonly attribute DOMString nodeName;
  4. boolean hasChildNodes();
  5. // FIXME: This should be a NodeList
  6. readonly attribute ArrayFromVector childNodes;
  7. readonly attribute Node? firstChild;
  8. readonly attribute Node? lastChild;
  9. readonly attribute Node? previousSibling;
  10. readonly attribute Node? nextSibling;
  11. readonly attribute Node? parentNode;
  12. readonly attribute Element? parentElement;
  13. attribute DOMString textContent;
  14. Node appendChild(Node node);
  15. [ImplementedAs=pre_insert] Node insertBefore(Node node, Node? child);
  16. [ImplementedAs=pre_remove] Node removeChild(Node child);
  17. const unsigned short ELEMENT_NODE = 1;
  18. const unsigned short ATTRIBUTE_NODE = 2;
  19. const unsigned short TEXT_NODE = 3;
  20. const unsigned short CDATA_SECTION_NODE = 4;
  21. const unsigned short ENTITY_REFERENCE_NODE = 5;
  22. const unsigned short ENTITY_NODE = 6;
  23. const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
  24. const unsigned short COMMENT_NODE = 8;
  25. const unsigned short DOCUMENT_NODE = 9;
  26. const unsigned short DOCUMENT_TYPE_NODE = 10;
  27. const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
  28. const unsigned short NOTATION_NODE = 12;
  29. };