ImageElement.hx 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. * Copyright (C)2005-2017 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\HTMLImageElement.webidl. Do not edit!
  23. package js.html;
  24. /**
  25. The `HTMLImageElement` interface provides special properties and methods  for manipulating the layout and presentation of `img` elements.
  26. Documentation [HTMLImageElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement>
  28. **/
  29. @:native("HTMLImageElement")
  30. extern class ImageElement extends Element
  31. {
  32. /**
  33. Is a `DOMString` that reflects the `alt` HTML attribute,  thus indicating fallback context for the image.
  34. **/
  35. var alt : String;
  36. /**
  37. Is a `DOMString` that reflects the `src` HTML attribute, containing the full URL of the image including base URI.
  38. **/
  39. var src : String;
  40. /**
  41. Is a `DOMString` reflecting the `srcset` HTML attribute, containing a list of candidate images, separated by a comma (`',', U+002C COMMA`). A candidate image is a URL followed by a `'w'` with the width of the images, or an `'x'` followed by the pixel density.
  42. **/
  43. var srcset : String;
  44. /**
  45. Is a `DOMString` representing the CORS setting for this image element. See CORS settings attributes for further details.
  46. **/
  47. var crossOrigin : String;
  48. /**
  49. Is a `DOMString` that reflects the `usemap` HTML attribute, containing a partial URL of a map element.
  50. **/
  51. var useMap : String;
  52. /**
  53. Is a `Boolean` that reflects the `ismap` HTML attribute, indicating that the image is part of a server-side image map.
  54. **/
  55. var isMap : Bool;
  56. /**
  57. Is a `unsigned long` that reflects the `width` HTML attribute, indicating the rendered width of the image in CSS pixels.
  58. **/
  59. var width : Int;
  60. /**
  61. Is a `unsigned long` that reflects the `height` HTML attribute, indicating the rendered height of the image in CSS pixels.
  62. **/
  63. var height : Int;
  64. /**
  65. Returns a `unsigned long` representing the intrinsic width of the image in CSS pixels, if it is available; otherwise, it will show `0`.
  66. **/
  67. var naturalWidth(default,null) : Int;
  68. /**
  69. Returns a `unsigned long` representing the intrinsic height of the image in CSS pixels, if it is available; else, it shows `0`.
  70. **/
  71. var naturalHeight(default,null) : Int;
  72. /**
  73. Returns a `Boolean` that is `true` if the browser has finished fetching the image, whether successful or not. It also shows true, if the image has no `HTMLImageElement.src` value.
  74. **/
  75. var complete(default,null) : Bool;
  76. /**
  77. Is a `DOMString` representing the name of the element.
  78. **/
  79. var name : String;
  80. /**
  81. Is a `DOMString` indicating the alignment of the image with respect to the surrounding context.
  82. **/
  83. var align : String;
  84. /**
  85. Is a `long` representing the space on either side of the image.
  86. **/
  87. var hspace : Int;
  88. /**
  89. Is a `long` representing the space above and below the image.
  90. **/
  91. var vspace : Int;
  92. /**
  93. Is a `DOMString` representing the URI of a long description of the image.
  94. **/
  95. var longDesc : String;
  96. /**
  97. Is a `DOMString` that is responsible for the width of the border surrounding the image. This is now deprecated and the CSS `border` property should be used instead.
  98. **/
  99. var border : String;
  100. /**
  101. Is a `DOMString` reflecting the `sizes` HTML attribute.
  102. **/
  103. var sizes : String;
  104. /**
  105. Returns a `DOMString` representing the URL to the currently displayed image (which may change, for example in response to media queries).
  106. **/
  107. var currentSrc(default,null) : String;
  108. var lowsrc : String;
  109. /**
  110. Returns a `long` representing the horizontal offset from the nearest layer. This property mimics an old Netscape 4 behavior.
  111. **/
  112. var x(default,null) : Int;
  113. /**
  114. Returns a `long` representing the vertical offset from the nearest layer. This property is also similar to behavior of an old Netscape 4.
  115. **/
  116. var y(default,null) : Int;
  117. }