Loads a single image. Useful for preloading images.
Parameters | uri | (goog.html.SafeUrl|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.Promise<Image, ?> | A Promise that will be resolved with the
given image if the image successfully loads.
|
|
---|