Range.hx 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright (C)2005-2015 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 from mozilla/Range.webidl line 16:0. Do not edit!
  23. package js.html;
  24. @:native("Range")
  25. extern class Range
  26. {
  27. static inline var START_TO_START : Int = 0;
  28. static inline var START_TO_END : Int = 1;
  29. static inline var END_TO_END : Int = 2;
  30. static inline var END_TO_START : Int = 3;
  31. var startContainer(default,null) : Node;
  32. var startOffset(default,null) : Int;
  33. var endContainer(default,null) : Node;
  34. var endOffset(default,null) : Int;
  35. var collapsed(default,null) : Bool;
  36. var commonAncestorContainer(default,null) : Node;
  37. /** @throws DOMError */
  38. function new() : Void;
  39. /** @throws DOMError */
  40. function setStart( refNode : Node, offset : Int ) : Void;
  41. /** @throws DOMError */
  42. function setEnd( refNode : Node, offset : Int ) : Void;
  43. /** @throws DOMError */
  44. function setStartBefore( refNode : Node ) : Void;
  45. /** @throws DOMError */
  46. function setStartAfter( refNode : Node ) : Void;
  47. /** @throws DOMError */
  48. function setEndBefore( refNode : Node ) : Void;
  49. /** @throws DOMError */
  50. function setEndAfter( refNode : Node ) : Void;
  51. function collapse( ?toStart : Bool = false ) : Void;
  52. /** @throws DOMError */
  53. function selectNode( refNode : Node ) : Void;
  54. /** @throws DOMError */
  55. function selectNodeContents( refNode : Node ) : Void;
  56. /** @throws DOMError */
  57. function compareBoundaryPoints( how : Int, sourceRange : Range ) : Int;
  58. /** @throws DOMError */
  59. function deleteContents() : Void;
  60. /** @throws DOMError */
  61. function extractContents() : DocumentFragment;
  62. /** @throws DOMError */
  63. function cloneContents() : DocumentFragment;
  64. /** @throws DOMError */
  65. function insertNode( node : Node ) : Void;
  66. /** @throws DOMError */
  67. function surroundContents( newParent : Node ) : Void;
  68. function cloneRange() : Range;
  69. function detach() : Void;
  70. /** @throws DOMError */
  71. function isPointInRange( node : Node, offset : Int ) : Bool;
  72. /** @throws DOMError */
  73. function comparePoint( node : Node, offset : Int ) : Int;
  74. /** @throws DOMError */
  75. function intersectsNode( node : Node ) : Bool;
  76. /** @throws DOMError */
  77. function createContextualFragment( fragment : String ) : DocumentFragment;
  78. function getClientRects() : DOMRectList;
  79. function getBoundingClientRect() : DOMRect;
  80. }