headjs/headjs — pull request #177 by ThomasBurleson (2012-02-08 22:49:07+00:00)
Title: Added load progress notification feature

Added new **_load progress_** feature that supports notification of load progress for each item in the head.js() queue:

/**
* Load files in parallel but execute them in sequence
* Note: developer is required to manually specify each script size!
*/
head
.js(
{ jquery :	"js/jquery/jquery.min.js",	size : "93876"	},
{ uuid :	"js/uuid.js",	size : "7362"	},
{ underscore : "js/underscore-min.js",	size : "12140"	}
{ namespace :	"js/namespace.min.js",	size : "392"	}
)
.notify( function (scriptName,scriptSize, loaded, total) {

/**
* As each library loads update a loading indicator;
* with subjective progress values
*/

});

This feature allows head.js() notifications to used to update a loading progress bar in a splash screen, update a log file, etc.