HTMLImageElement
Generated from idl/html.webidl when the site was built at 7aa23e2.
HTMLImageElement is an interface in idl/html.webidl, inheriting HTMLElement, exposed in Window. What it does is on MDN; this page says what niso has of it.
Status
Section titled “Status”The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).
| Feature | On the web | In niso | Members |
|---|---|---|---|
| <img> | Widely available | Partial 24% 129 of 537 subtests pass | 9 |
Members
Section titled “Members”constructor
Section titled “constructor”[HTMLConstructor] constructor();attribute DOMString alt;int32_t niso_html_image_element_get_alt(niso_dom* dom, niso_handle self, niso_str* out);int32_t niso_html_image_element_set_alt(niso_dom* dom, niso_handle self, const char* value, size_t value_len);attribute USVString src;int32_t niso_html_image_element_get_src(niso_dom* dom, niso_handle self, niso_str* out);int32_t niso_html_image_element_set_src(niso_dom* dom, niso_handle self, const char* value, size_t value_len);attribute unsigned long width;int32_t niso_html_image_element_get_width(niso_dom* dom, niso_handle self, uint32_t* out);int32_t niso_html_image_element_set_width(niso_dom* dom, niso_handle self, uint32_t value);height
Section titled “height”attribute unsigned long height;int32_t niso_html_image_element_get_height(niso_dom* dom, niso_handle self, uint32_t* out);int32_t niso_html_image_element_set_height(niso_dom* dom, niso_handle self, uint32_t value);naturalWidth
Section titled “naturalWidth”readonly attribute unsigned long naturalWidth;int32_t niso_html_image_element_get_natural_width(niso_dom* dom, niso_handle self, uint32_t* out);naturalHeight
Section titled “naturalHeight”readonly attribute unsigned long naturalHeight;int32_t niso_html_image_element_get_natural_height(niso_dom* dom, niso_handle self, uint32_t* out);complete
Section titled “complete”readonly attribute boolean complete;int32_t niso_html_image_element_get_complete(niso_dom* dom, niso_handle self, bool* out);crossOrigin
Section titled “crossOrigin”attribute DOMString? crossOrigin;int32_t niso_html_image_element_get_cross_origin(niso_dom* dom, niso_handle self, niso_str* out);int32_t niso_html_image_element_set_cross_origin(niso_dom* dom, niso_handle self, const char* value, size_t value_len);Not in niso yet
Section titled “Not in niso yet”Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.
Image(<img>)attributionSrc(Attribution reporting)decode(<img>)decoding(<img>)fetchPriority(Fetch priority)isMap(Image maps)loading(Lazy-loading images and iframes)referrerPolicy(Referrer policy)sharedStorageWritable(Shared storage)sizes(srcset and sizes)srcset(srcset and sizes)useMap(Image maps)x(<img>)y(<img>)