Liking cljdoc? Tell your friends :D

web.dom.HTMLImageElement

The HTMLImageElement interface represents an HTML <img> element, the properties and methods used to manipulate image elements.

The HTMLImageElement interface represents an HTML `<img>` element,
the properties and methods used to manipulate image elements.
raw docstring

aligncljs

(align this)

Property.

A DOMString indicating the alignment of the image with respect the surrounding context. The possible values are "left", "right", and "center". This is obsolete; you should instead use CSS (such text-align, which works with images despite its name) to specify alignment.

Property.

A DOMString indicating the alignment of the image with respect
the surrounding context. The possible values are "left", "right",
and "center". This is obsolete; you should instead use CSS (such
text-align, which works with images despite its name) to specify
alignment.
sourceraw docstring

altcljs

(alt this)

Property.

The web.dom.HTMLImageElement property alt provides fallback text to display when the image specified by the <img> element not loaded.

htmlImageElement.alt = altText; let altText = htmlImageElement.alt;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt

Property.

The `web.dom.HTMLImageElement` property alt provides fallback
text to display when the image specified by the `<img>` element
not loaded.

`htmlImageElement.alt = altText;
let altText = htmlImageElement.alt;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt`
sourceraw docstring

bordercljs

(border this)

Property.

A DOMString which defines the width of the border surrounding image. This is deprecated; use the CSS border property instead.

Property.

A DOMString which defines the width of the border surrounding
image. This is deprecated; use the CSS border property instead.
sourceraw docstring

completecljs

(complete this)

Property.

[Read Only]

The read-only web.dom.HTMLImageElement interface's complete is a Boolean value which indicates whether or not the image has loaded.

let doneLoading = htmlImageElement.complete;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete

Property.

[Read Only]

The read-only `web.dom.HTMLImageElement` interface's complete
is a Boolean value which indicates whether or not the image has
loaded.

`let doneLoading = htmlImageElement.complete;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete`
sourceraw docstring

cross-origincljs

(cross-origin this)

Property.

The web.dom.HTMLImageElement interface's crossOrigin attribute a string which specifies the Cross-Origin Resource Sharing (CORS) to use when retrieving the image.

htmlImageElement.crossOrigin = crossOriginMode; let crossOriginMode = htmlImageElement.crossOrigin;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin

Property.

The `web.dom.HTMLImageElement` interface's crossOrigin attribute
a string which specifies the Cross-Origin Resource Sharing (CORS)
to use when retrieving the image.

`htmlImageElement.crossOrigin = crossOriginMode;
let crossOriginMode = htmlImageElement.crossOrigin;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin`
sourceraw docstring

current-srccljs

(current-src this)

Property.

Returns a USVString representing the URL from which the currently image was loaded. This may change as the image is adjusted due changing conditions, as directed by any media queries which are place.

Property.

Returns a USVString representing the URL from which the currently
image was loaded. This may change as the image is adjusted due
changing conditions, as directed by any media queries which are
place.
sourceraw docstring

decodecljs

(decode this)

Method.

The decode() method of the web.dom.HTMLImageElement interface a js.Promise that resolves when the image is decoded and it safe to append the image to the DOM.

var promise = HTMLImageElement.decode();

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decode

Method.

The decode() method of the `web.dom.HTMLImageElement` interface
a `js.Promise` that resolves when the image is decoded and it
safe to append the image to the DOM.

`var promise = HTMLImageElement.decode();`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decode`
sourceraw docstring

decodingcljs

(decoding this)

Property.

The decoding property of the web.dom.HTMLImageElement interface a hint given to the browser on how it should decode the image.

refStr = imgElem.decoding; imgElem.decoding = refStr;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding

Property.

The decoding property of the `web.dom.HTMLImageElement` interface
a hint given to the browser on how it should decode the image.

`refStr = imgElem.decoding;
imgElem.decoding = refStr;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding`
sourceraw docstring

heightcljs

(height this)

Property.

An integer value that reflects the height HTML attribute, indicating rendered height of the image in CSS pixels.

Property.

An integer value that reflects the height HTML attribute, indicating
rendered height of the image in CSS pixels.
sourceraw docstring

hspacecljs

(hspace this)

Property.

An integer value which specifies the amount of space (in pixels) leave empty on the left and right sides of the image.

Property.

An integer value which specifies the amount of space (in pixels)
leave empty on the left and right sides of the image.
sourceraw docstring

is-mapcljs

(is-map this)

Property.

A Boolean that reflects the ismap HTML attribute, indicating the image is part of a server-side image map. This is different a client-side image map, specified using an <img> element and corresponding <map> which contains <area> elements indicating clickable areas in the image. The image must be contained within <a> element; see the ismap page for details.

Property.

A Boolean that reflects the ismap HTML attribute, indicating
the image is part of a server-side image map. This is different
a client-side image map, specified using an <img> element and
corresponding <map> which contains <area> elements indicating
clickable areas in the image. The image must be contained within
<a> element; see the ismap page for details.
sourceraw docstring

long-desccljs

(long-desc this)

Property.

A USVString specifying the URL at which a long description of image's contents may be found. This is used to turn the image a hyperlink automatically. Modern HTML should instead simply an <img> inside an <a> element defining the hyperlink.

Property.

A USVString specifying the URL at which a long description of
image's contents may be found. This is used to turn the image
a hyperlink automatically. Modern HTML should instead simply
an <img> inside an <a> element defining the hyperlink.
sourceraw docstring

low-srccljs

(low-src this)

Property.

A USVString specifying the URL of a low-quality (but faster to version of the same image. This was once used by browsers under network conditions or on slow devices.

Property.

A USVString specifying the URL of a low-quality (but faster to
version of the same image. This was once used by browsers under
network conditions or on slow devices.
sourceraw docstring

namecljs

(name this)

Property.

A DOMString representing the name of the element.

Property.

A DOMString representing the name of the element.
sourceraw docstring

natural-heightcljs

(natural-height this)

Property.

Returns an integer value representing the intrinsic height of image in CSS pixels, if it is available; else, it shows 0. This the height the image would be if it were rendered at its natural size.

Property.

Returns an integer value representing the intrinsic height of
image in CSS pixels, if it is available; else, it shows 0. This
the height the image would be if it were rendered at its natural
size.
sourceraw docstring

natural-widthcljs

(natural-width this)

Property.

An integer value representing the intrinsic width of the image CSS pixels, if it is available; otherwise, it will show 0. This the width the image would be if it were rendered at its natural size.

Property.

An integer value representing the intrinsic width of the image
CSS pixels, if it is available; otherwise, it will show 0. This
the width the image would be if it were rendered at its natural
size.
sourceraw docstring

referrer-policycljs

(referrer-policy this)

Property.

The HTMLImageElement.referrerPolicy property reflects the HTML attribute of the <img> element defining which referrer is sent fetching the resource.

refStr = imgElt.referrerPolicy; imgElt.referrerPolicy = refStr;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy

Property.

The HTMLImageElement.referrerPolicy property reflects the HTML
attribute of the `<img>` element defining which referrer is sent
fetching the resource.

`refStr = imgElt.referrerPolicy;
imgElt.referrerPolicy = refStr;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy`
sourceraw docstring

set-align!cljs

(set-align! this val)

Property.

A DOMString indicating the alignment of the image with respect the surrounding context. The possible values are "left", "right", and "center". This is obsolete; you should instead use CSS (such text-align, which works with images despite its name) to specify alignment.

Property.

A DOMString indicating the alignment of the image with respect
the surrounding context. The possible values are "left", "right",
and "center". This is obsolete; you should instead use CSS (such
text-align, which works with images despite its name) to specify
alignment.
sourceraw docstring

set-alt!cljs

(set-alt! this val)

Property.

The web.dom.HTMLImageElement property alt provides fallback text to display when the image specified by the <img> element not loaded.

htmlImageElement.alt = altText; let altText = htmlImageElement.alt;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt

Property.

The `web.dom.HTMLImageElement` property alt provides fallback
text to display when the image specified by the `<img>` element
not loaded.

`htmlImageElement.alt = altText;
let altText = htmlImageElement.alt;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt`
sourceraw docstring

set-border!cljs

(set-border! this val)

Property.

A DOMString which defines the width of the border surrounding image. This is deprecated; use the CSS border property instead.

Property.

A DOMString which defines the width of the border surrounding
image. This is deprecated; use the CSS border property instead.
sourceraw docstring

set-cross-origin!cljs

(set-cross-origin! this val)

Property.

The web.dom.HTMLImageElement interface's crossOrigin attribute a string which specifies the Cross-Origin Resource Sharing (CORS) to use when retrieving the image.

htmlImageElement.crossOrigin = crossOriginMode; let crossOriginMode = htmlImageElement.crossOrigin;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin

Property.

The `web.dom.HTMLImageElement` interface's crossOrigin attribute
a string which specifies the Cross-Origin Resource Sharing (CORS)
to use when retrieving the image.

`htmlImageElement.crossOrigin = crossOriginMode;
let crossOriginMode = htmlImageElement.crossOrigin;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin`
sourceraw docstring

set-current-src!cljs

(set-current-src! this val)

Property.

Returns a USVString representing the URL from which the currently image was loaded. This may change as the image is adjusted due changing conditions, as directed by any media queries which are place.

Property.

Returns a USVString representing the URL from which the currently
image was loaded. This may change as the image is adjusted due
changing conditions, as directed by any media queries which are
place.
sourceraw docstring

set-decoding!cljs

(set-decoding! this val)

Property.

The decoding property of the web.dom.HTMLImageElement interface a hint given to the browser on how it should decode the image.

refStr = imgElem.decoding; imgElem.decoding = refStr;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding

Property.

The decoding property of the `web.dom.HTMLImageElement` interface
a hint given to the browser on how it should decode the image.

`refStr = imgElem.decoding;
imgElem.decoding = refStr;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding`
sourceraw docstring

set-height!cljs

(set-height! this val)

Property.

An integer value that reflects the height HTML attribute, indicating rendered height of the image in CSS pixels.

Property.

An integer value that reflects the height HTML attribute, indicating
rendered height of the image in CSS pixels.
sourceraw docstring

set-hspace!cljs

(set-hspace! this val)

Property.

An integer value which specifies the amount of space (in pixels) leave empty on the left and right sides of the image.

Property.

An integer value which specifies the amount of space (in pixels)
leave empty on the left and right sides of the image.
sourceraw docstring

set-is-map!cljs

(set-is-map! this val)

Property.

A Boolean that reflects the ismap HTML attribute, indicating the image is part of a server-side image map. This is different a client-side image map, specified using an <img> element and corresponding <map> which contains <area> elements indicating clickable areas in the image. The image must be contained within <a> element; see the ismap page for details.

Property.

A Boolean that reflects the ismap HTML attribute, indicating
the image is part of a server-side image map. This is different
a client-side image map, specified using an <img> element and
corresponding <map> which contains <area> elements indicating
clickable areas in the image. The image must be contained within
<a> element; see the ismap page for details.
sourceraw docstring

set-long-desc!cljs

(set-long-desc! this val)

Property.

A USVString specifying the URL at which a long description of image's contents may be found. This is used to turn the image a hyperlink automatically. Modern HTML should instead simply an <img> inside an <a> element defining the hyperlink.

Property.

A USVString specifying the URL at which a long description of
image's contents may be found. This is used to turn the image
a hyperlink automatically. Modern HTML should instead simply
an <img> inside an <a> element defining the hyperlink.
sourceraw docstring

set-low-src!cljs

(set-low-src! this val)

Property.

A USVString specifying the URL of a low-quality (but faster to version of the same image. This was once used by browsers under network conditions or on slow devices.

Property.

A USVString specifying the URL of a low-quality (but faster to
version of the same image. This was once used by browsers under
network conditions or on slow devices.
sourceraw docstring

set-name!cljs

(set-name! this val)

Property.

A DOMString representing the name of the element.

Property.

A DOMString representing the name of the element.
sourceraw docstring

set-natural-height!cljs

(set-natural-height! this val)

Property.

Returns an integer value representing the intrinsic height of image in CSS pixels, if it is available; else, it shows 0. This the height the image would be if it were rendered at its natural size.

Property.

Returns an integer value representing the intrinsic height of
image in CSS pixels, if it is available; else, it shows 0. This
the height the image would be if it were rendered at its natural
size.
sourceraw docstring

set-natural-width!cljs

(set-natural-width! this val)

Property.

An integer value representing the intrinsic width of the image CSS pixels, if it is available; otherwise, it will show 0. This the width the image would be if it were rendered at its natural size.

Property.

An integer value representing the intrinsic width of the image
CSS pixels, if it is available; otherwise, it will show 0. This
the width the image would be if it were rendered at its natural
size.
sourceraw docstring

set-referrer-policy!cljs

(set-referrer-policy! this val)

Property.

The HTMLImageElement.referrerPolicy property reflects the HTML attribute of the <img> element defining which referrer is sent fetching the resource.

refStr = imgElt.referrerPolicy; imgElt.referrerPolicy = refStr;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy

Property.

The HTMLImageElement.referrerPolicy property reflects the HTML
attribute of the `<img>` element defining which referrer is sent
fetching the resource.

`refStr = imgElt.referrerPolicy;
imgElt.referrerPolicy = refStr;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy`
sourceraw docstring

set-sizes!cljs

(set-sizes! this val)

Property.

A DOMString reflecting the sizes HTML attribute. This string a list of comma-separated conditional sizes for the image; that for a given viewport size, a particular image size is to be used. the documentation on the sizes page for details on the format this string.

Property.

A DOMString reflecting the sizes HTML attribute. This string
a list of comma-separated conditional sizes for the image; that
for a given viewport size, a particular image size is to be used.
the documentation on the sizes page for details on the format
this string.
sourceraw docstring

set-src!cljs

(set-src! this val)

Property.

A USVString that reflects the src HTML attribute, which contains full URL of the image including base URI. You can load a different into the element by changing the URL in the src attribute.

Property.

A USVString that reflects the src HTML attribute, which contains
full URL of the image including base URI. You can load a different
into the element by changing the URL in the src attribute.
sourceraw docstring

set-srcset!cljs

(set-srcset! this val)

Property.

A USVString reflecting the srcset HTML attribute. This specifies list of candidate images, separated by commas (',', U+002C COMMA). candidate image is a URL followed by a space, followed by a specially-formatted indicating the size of the image. The size may be specified either width or a size multiple. Read the srcset page for specifics the format of the size substring.

Property.

A USVString reflecting the srcset HTML attribute. This specifies
list of candidate images, separated by commas (',', U+002C COMMA).
candidate image is a URL followed by a space, followed by a specially-formatted
indicating the size of the image. The size may be specified either
width or a size multiple. Read the srcset page for specifics
the format of the size substring.
sourceraw docstring

set-use-map!cljs

(set-use-map! this val)

Property.

A DOMString reflecting the usemap HTML attribute, containing page-local URL of the <map> element describing the image map use. The page-local URL is a pound (hash) symbol (#) followed the ID of the <map> element, such as #my-map-element. The <map> turn contains <area> elements indicating the clickable areas the image.

Property.

A DOMString reflecting the usemap HTML attribute, containing
page-local URL of the <map> element describing the image map
use. The page-local URL is a pound (hash) symbol (#) followed
the ID of the <map> element, such as #my-map-element. The <map>
turn contains <area> elements indicating the clickable areas
the image.
sourceraw docstring

set-vspace!cljs

(set-vspace! this val)

Property.

An integer value specifying the amount of empty space, in pixels, leave above and below the image.

Property.

An integer value specifying the amount of empty space, in pixels,
leave above and below the image.
sourceraw docstring

set-width!cljs

(set-width! this val)

Property.

An integer value that reflects the width HTML attribute, indicating rendered width of the image in CSS pixels.

Property.

An integer value that reflects the width HTML attribute, indicating
rendered width of the image in CSS pixels.
sourceraw docstring

sizescljs

(sizes this)

Property.

A DOMString reflecting the sizes HTML attribute. This string a list of comma-separated conditional sizes for the image; that for a given viewport size, a particular image size is to be used. the documentation on the sizes page for details on the format this string.

Property.

A DOMString reflecting the sizes HTML attribute. This string
a list of comma-separated conditional sizes for the image; that
for a given viewport size, a particular image size is to be used.
the documentation on the sizes page for details on the format
this string.
sourceraw docstring

srccljs

(src this)

Property.

A USVString that reflects the src HTML attribute, which contains full URL of the image including base URI. You can load a different into the element by changing the URL in the src attribute.

Property.

A USVString that reflects the src HTML attribute, which contains
full URL of the image including base URI. You can load a different
into the element by changing the URL in the src attribute.
sourceraw docstring

srcsetcljs

(srcset this)

Property.

A USVString reflecting the srcset HTML attribute. This specifies list of candidate images, separated by commas (',', U+002C COMMA). candidate image is a URL followed by a space, followed by a specially-formatted indicating the size of the image. The size may be specified either width or a size multiple. Read the srcset page for specifics the format of the size substring.

Property.

A USVString reflecting the srcset HTML attribute. This specifies
list of candidate images, separated by commas (',', U+002C COMMA).
candidate image is a URL followed by a space, followed by a specially-formatted
indicating the size of the image. The size may be specified either
width or a size multiple. Read the srcset page for specifics
the format of the size substring.
sourceraw docstring

use-mapcljs

(use-map this)

Property.

A DOMString reflecting the usemap HTML attribute, containing page-local URL of the <map> element describing the image map use. The page-local URL is a pound (hash) symbol (#) followed the ID of the <map> element, such as #my-map-element. The <map> turn contains <area> elements indicating the clickable areas the image.

Property.

A DOMString reflecting the usemap HTML attribute, containing
page-local URL of the <map> element describing the image map
use. The page-local URL is a pound (hash) symbol (#) followed
the ID of the <map> element, such as #my-map-element. The <map>
turn contains <area> elements indicating the clickable areas
the image.
sourceraw docstring

vspacecljs

(vspace this)

Property.

An integer value specifying the amount of empty space, in pixels, leave above and below the image.

Property.

An integer value specifying the amount of empty space, in pixels,
leave above and below the image.
sourceraw docstring

widthcljs

(width this)

Property.

An integer value that reflects the width HTML attribute, indicating rendered width of the image in CSS pixels.

Property.

An integer value that reflects the width HTML attribute, indicating
rendered width of the image in CSS pixels.
sourceraw docstring

xcljs

(x this)

Property.

[Read Only]

The read-only web.dom.HTMLImageElement property x indicates x-coordinate of the <img> element's left border edge relative the root element's origin.

let imageX = htmlImageElement.x;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/x

Property.

[Read Only]

The read-only `web.dom.HTMLImageElement` property x indicates
x-coordinate of the `<img>` element's left border edge relative
the root element's origin.

`let imageX = htmlImageElement.x;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/x`
sourceraw docstring

ycljs

(y this)

Property.

[Read Only]

The read-only web.dom.HTMLImageElement property y indicates y-coordinate of the <img> element's top border edge relative the root element's origin.

let imageY = htmlImageElement.y;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/y

Property.

[Read Only]

The read-only `web.dom.HTMLImageElement` property y indicates
y-coordinate of the `<img>` element's top border edge relative
the root element's origin.

`let imageY = htmlImageElement.y;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/y`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close