The goog.labs.net.image
Namespace
.load(uri, opt_image)
Loads a single image. Useful for preloading images. May be combined with
goog.labs.result.combine to preload many images.
uri
{string
}
- URI of the image.
opt_image
{(Image
|function
(): !Image
)=}
- If present, instead of
creating a new Image instance the function will use the passed Image
instance or the result of calling the Image factory respectively. This
can be used to control exactly how Image instances are created, for
example if they should be created in a particular document element, or
have fields that will trigger CORS image fetches.
- returns {!
goog.labs.result.Result
}
- An asyncronous result that will succeed
if the image successfully loads or error if the image load fails.