Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 666 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 666 Bytes

dojo-loader-progress

Use this tool to track the progress of the Dojo Toolkit loader.

Usage:

  1. Include progress.js immediately after loading the Dojo Toolkit
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.1/dojo/dojo.js"></script>
<script src="progress.js"></script>
  1. Use the require.progress variable:
console.log('Loader Progress: ', Math.round(require.progress) + '%');

or define a custom require.onProgress function:

require.onProgress = function(percent, complete, total) {
	console.log('Loader Progress:', Math.round(percent) + '%');
	console.log('Loaded ', complete, ' of ', total);
};