search

goog.net.ImageLoader

Provided By
Extends
All Implemented Interfaces

Image loader utility class. Raises a 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:

   const 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.

new ImageLoader( opt_parent )

Parameters
opt_parent(Element|null)=

An optional parent element whose document object should be used to load images.

Instance Methods

Instance Properties

Enumerations