complete
Summary
Gets whether an image is completely loaded.
Property of dom/HTMLImageElementdom/HTMLImageElement
Syntax
Note: This property is read-only.
var complete = image.complete;
Return Value
Returns an object of type BooleanBoolean
Whether the image is completely loaded.
Usage
Use this property to determine whether an image is completely loaded, or still in the process of loading.
Notes
Once an image is completely loaded, you can get its actual naturalWidth and naturalHeight properties, or make layout assumptions.
Related specifications
- W3C HTML5
- Working Draft
- WHATWG HTML
- Living Standard
See also
Related pages
img
input
input type=image
Reference
- onreadystatechangeonreadystatechange
- readyStatereadyState
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]