goog.events.EventType.LOAD
event for each image loaded, with an Image
object as the target of
the event, normalized to have naturalHeight
and naturalWidth
attributes.
To use this class, run:
var imageLoader = new goog.net.ImageLoader(); goog.events.listen(imageLoader, goog.net.EventType.COMPLETE, function(e) { ... }); imageLoader.addImage("image_id", "http://path/to/image.gif"); imageLoader.start();The start() method must be called to start image loading. Images can be added and removed after loading has started, but only those images added before start() was called will be loaded until start() is called again. A goog.net.EventType.COMPLETE event will be dispatched only once all outstanding images have completed uploading.