NodeFilter.hx 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * Copyright (C)2005-2013 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated, do not edit!
  23. package js.html;
  24. @:native("NodeFilter")
  25. extern class NodeFilter
  26. {
  27. /** Value returned by the <code><a rel="internal" href="https://developer.mozilla.org/Article_not_found?uri=en/DOM/NodeFilter.acceptNode" class="new">NodeFilter.acceptNode()</a></code>
  28. method when a node should be accepted. */
  29. static inline var FILTER_ACCEPT : Int = 1;
  30. /** Value to be returned by the <code><a rel="internal" href="https://developer.mozilla.org/Article_not_found?uri=en/DOM/NodeFilter.acceptNode" class="new">NodeFilter.acceptNode()</a></code>
  31. method when a node should be rejected. The children of rejected nodes are not visited by the <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/NodeIterator">NodeIterator</a></code>
  32. or <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/TreeWalker">TreeWalker</a></code>
  33. object; this value is treated as "skip this node and all its children". */
  34. static inline var FILTER_REJECT : Int = 2;
  35. /** Value to be returned by <code><a rel="internal" href="https://developer.mozilla.org/Article_not_found?uri=en/DOM/NodeFilter.acceptNode" class="new">NodeFilter.acceptNode()</a></code>
  36. for nodes to be skipped by the <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/NodeIterator">NodeIterator</a></code>
  37. or <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/TreeWalker">TreeWalker</a></code>
  38. object. The children of skipped nodes are still considered. This is treated as "skip this node but not its children". */
  39. static inline var FILTER_SKIP : Int = 3;
  40. /** Shows all nodes. */
  41. static inline var SHOW_ALL : Int = 0xFFFFFFFF;
  42. /** Shows attribute <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Attr">Attr</a></code>
  43. nodes. This is meaningful only when creating a <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/NodeIterator">NodeIterator</a></code>
  44. or <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/TreeWalker">TreeWalker</a></code>
  45. with an <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Attr">Attr</a></code>
  46. node as its root; in this case, it means that the attribute node will appear in the first position of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. */
  47. static inline var SHOW_ATTRIBUTE : Int = 0x00000002;
  48. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/CDATASection">CDATASection</a></code>
  49. &nbsp;nodes. */
  50. static inline var SHOW_CDATA_SECTION : Int = 0x00000008;
  51. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Comment">Comment</a></code>
  52. &nbsp;nodes. */
  53. static inline var SHOW_COMMENT : Int = 0x00000080;
  54. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Document">Document</a></code>
  55. &nbsp;nodes. */
  56. static inline var SHOW_DOCUMENT : Int = 0x00000100;
  57. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/DocumentFragment">DocumentFragment</a></code>
  58. &nbsp;nodes. */
  59. static inline var SHOW_DOCUMENT_FRAGMENT : Int = 0x00000400;
  60. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/DocumentType">DocumentType</a></code>
  61. &nbsp;nodes. */
  62. static inline var SHOW_DOCUMENT_TYPE : Int = 0x00000200;
  63. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Element">Element</a></code>
  64. &nbsp;nodes. */
  65. static inline var SHOW_ELEMENT : Int = 0x00000001;
  66. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Entity">Entity</a></code>
  67. &nbsp;nodes. This is meaningful only when creating a <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/NodeIterator">NodeIterator</a></code>
  68. or <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/TreeWalker">TreeWalker</a></code>
  69. with an <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Entity">Entity</a></code>
  70. node as its root; in this case, it means that the <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Entity">Entity</a></code>
  71. node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree. */
  72. static inline var SHOW_ENTITY : Int = 0x00000020;
  73. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/EntityReference">EntityReference</a></code>
  74. &nbsp;nodes. */
  75. static inline var SHOW_ENTITY_REFERENCE : Int = 0x00000010;
  76. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Notation">Notation</a></code>
  77. nodes. This is meaningful only when creating a <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/NodeIterator">NodeIterator</a></code>
  78. or <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/TreeWalker">TreeWalker</a></code>
  79. with a <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Notation">Notation</a></code>
  80. node as its root; in this case, it means that the <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Notation">Notation</a></code>
  81. node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree. */
  82. static inline var SHOW_NOTATION : Int = 0x00000800;
  83. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/ProcessingInstruction">ProcessingInstruction</a></code>
  84. &nbsp;nodes. */
  85. static inline var SHOW_PROCESSING_INSTRUCTION : Int = 0x00000040;
  86. /** Shows <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Text">Text</a></code>
  87. &nbsp;nodes. */
  88. static inline var SHOW_TEXT : Int = 0x00000004;
  89. function acceptNode( n : Node ) : Int;
  90. }