ImageElement.hx 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. * Copyright (C)2005-2019 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. Is a `DOMString` that reflects the `alt` HTML attribute,  thus indicating fallback context for the image.
  33. **/
  34. var alt : String;
  35. /**
  36. Is a `DOMString` that reflects the `src` HTML attribute, containing the full URL of the image including base URI.
  37. **/
  38. var src : String;
  39. /**
  40. 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.
  41. **/
  42. var srcset : String;
  43. /**
  44. Is a `DOMString` representing the CORS setting for this image element. See CORS settings attributes for further details.
  45. **/
  46. var crossOrigin : String;
  47. /**
  48. Is a `DOMString` that reflects the `usemap` HTML attribute, containing a partial URL of a map element.
  49. **/
  50. var useMap : String;
  51. /**
  52. Is a `DOMString` that reflects the `referrerpolicy` HTML attribute indicating which referrer to use in order to fetch the image.
  53. **/
  54. var referrerPolicy : String;
  55. /**
  56. Is a `Boolean` that reflects the `ismap` HTML attribute, indicating that the image is part of a server-side image map.
  57. **/
  58. var isMap : Bool;
  59. /**
  60. Is a `unsigned long` that reflects the `width` HTML attribute, indicating the rendered width of the image in CSS pixels.
  61. **/
  62. var width : Int;
  63. /**
  64. Is a `unsigned long` that reflects the `height` HTML attribute, indicating the rendered height of the image in CSS pixels.
  65. **/
  66. var height : Int;
  67. /**
  68. Returns a `DOMString` representing a hint given to the browser on how it should decode the image.
  69. **/
  70. var decoding : String;
  71. /**
  72. Returns a `unsigned long` representing the intrinsic width of the image in CSS pixels, if it is available; otherwise, it will show `0`.
  73. **/
  74. var naturalWidth(default,null) : Int;
  75. /**
  76. Returns a `unsigned long` representing the intrinsic height of the image in CSS pixels, if it is available; else, it shows `0`.
  77. **/
  78. var naturalHeight(default,null) : Int;
  79. /**
  80. 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.
  81. **/
  82. var complete(default,null) : Bool;
  83. /**
  84. Is a `DOMString` representing the name of the element.
  85. **/
  86. var name : String;
  87. /**
  88. Is a `DOMString` indicating the alignment of the image with respect to the surrounding context. The possible values are `"left"`, `"right"`, `"justify"`, and `"center"`.
  89. **/
  90. var align : String;
  91. /**
  92. Is a `long` representing the space on either side of the image.
  93. **/
  94. var hspace : Int;
  95. /**
  96. Is a `long` representing the space above and below the image.
  97. **/
  98. var vspace : Int;
  99. /**
  100. Is a `DOMString` representing the URI of a long description of the image.
  101. **/
  102. var longDesc : String;
  103. /**
  104. 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.
  105. **/
  106. var border : String;
  107. /**
  108. Is a `DOMString` reflecting the `sizes` HTML attribute.
  109. **/
  110. var sizes : String;
  111. /**
  112. Returns a `DOMString` representing the URL to the currently displayed image (which may change, for example in response to media queries).
  113. **/
  114. var currentSrc(default,null) : String;
  115. /**
  116. Is a `DOMString` that refers to a low-quality (but faster to load) copy of the image.
  117. **/
  118. var lowsrc : String;
  119. /**
  120. Returns a `long` representing the horizontal offset from the nearest layer. This property mimics an old Netscape 4 behavior.
  121. **/
  122. var x(default,null) : Int;
  123. /**
  124. Returns a `long` representing the vertical offset from the nearest layer. This property is also similar to behavior of an old Netscape 4.
  125. **/
  126. var y(default,null) : Int;
  127. }