documentation

Documentation generator: JsDoc Toolkit 2.4.0
Template: Wink 1.0
Generated on:

Class wink.net.SmartLoader

Load images, css and js resources. It warns the user when the task is complete. It can also display a progress bar while loading The smart loader needs parameters to configure the progress bar. Use the 'load' method to start loading datas. If you want to display the progress bar, use the 'getDomNode' method of the smart loader.

Class Summary
Constructor Attributes Constructor Name and Description
 
wink.net.SmartLoader(properties)
Compatibility
Compatibility list Supported platforms / browsers
iOS2, iOS3, iOS4, iOS5, iOS6, Android 1.1, Android 1.5, Android 2.1, Android 2.2, Android 2.3, Android 3.0, Android 3.1, Android 4.0, BlackBerry 6, BlackBerry 7, Bada 1.0, Windows Phone 7.5, Windows Phone 8

Method Summary

Class Detail

wink.net.SmartLoader(properties)
var progressBarProperties =
{
	height: 15,
	width: 250,
	borderColor: '#000',
	progressBarColor: 'transparent',
	progressBarImage:
	{
		image: 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAIAAACgpqunAAAAGXR...',
		type: 'png'
	}
}

smartLoader = new wink.net.SmartLoader(progressBarProperties);

document.body.appendChild(smartLoader.getDomNode());
Parameters:
{object} properties
The properties object (see wink.ui.xy.ProgressBar properties)
Requires:
wink.ui.xy.ProgressBar
wink.net.CssLoader
wink.net.JsLoader
wink.net.ImagesLoader
See:
Test page

Field Detail

{integer} uId
Unique identifier

Method Detail

  • {HTMLElement} getDomNode()
    return the dom node containing the progressbar
    Returns:
    {HTMLElement} The main dom node
  • load(data)
    Start processing the datas datas can be a single script or a collection of scripts. Idem for images and styles
    Parameters:
    {object} data
    An object containing the list of scripts, images and stylesheets to be loaded
    {array} data.scripts
    The script(s) you want to preload. It must be a string or an array of strings
    {array} data.styles
    The stylesheet(s) you want to preload. It must be a string or an array of strings
    {array} data.images
    The image(s) you want to preload. It must be a string or an array of strings

Event Detail

/smartloader/events/loadend
All the data have been preloaded