function subscribe(bundleIds, callbackFn) {
	      // listify
	      bundleIds = bundleIds.push ? bundleIds : [bundleIds];
	      var depsNotFound = [],
	          i = bundleIds.length,
	          numWaiting = i,
	          fn,
	          bundleId,
	          r,
	          q; // define callback function

	      fn = function fn(bundleId, pathsNotFound) {
	        if (pathsNotFound.length) depsNotFound.push(bundleId);
	        numWaiting--;
	        if (!numWaiting) callbackFn(depsNotFound);
	      }; // register callback


	      while (i--) {
	        bundleId = bundleIds[i]; // execute callback if in result cache

	        r = bundleResultCache[bundleId];

	        if (r) {
	          fn(bundleId, r);
	          continue;
	        } // add to callback queue


	        q = bundleCallbackQueue[bundleId] = bundleCallbackQueue[bundleId] || [];
	        q.push(fn);
	      }
	    }
function subscribe(bundleIds, callbackFn) {
	      
	      bundleIds = bundleIds.push ? bundleIds : [bundleIds];
	      var depsNotFound = [],
	          i = bundleIds.length,
	          numWaiting = i,
	          fn,
	          bundleId,
	          r,
	          q; 

	      fn = function fn(bundleId, pathsNotFound) {
	        if (pathsNotFound.length) depsNotFound.push(bundleId);
	        numWaiting--;
	        if (!numWaiting) callbackFn(depsNotFound);
	      }; 


	      while (i--) {
	        bundleId = bundleIds[i]; 

	        r = bundleResultCache[bundleId];

	        if (r) {
	          fn(bundleId, r);
	          continue;
	        } 


	        q = bundleCallbackQueue[bundleId] = bundleCallbackQueue[bundleId] || [];
	        q.push(fn);
	      }
	    }
function subscribe ( bundleIds , callbackFn ) { // listify bundleIds = bundleIds . push ? bundleIds : [ bundleIds ] ; var depsNotFound = [ ] , i = bundleIds . length , numWaiting = i , fn , bundleId , r , q ; // define callback function fn = function fn ( bundleId , pathsNotFound ) { if ( pathsNotFound . length ) depsNotFound . push ( bundleId ) ; numWaiting -- ; if ( ! numWaiting ) callbackFn ( depsNotFound ) ; } ; // register callback while ( i -- ) { bundleId = bundleIds [ i ] ; // execute callback if in result cache r = bundleResultCache [ bundleId ] ; if ( r ) { fn ( bundleId , r ) ; continue ; } // add to callback queue q = bundleCallbackQueue [ bundleId ] = bundleCallbackQueue [ bundleId ] || [ ] ; q . push ( fn ) ; } }
Subscribe to bundle load event.
@param {string[]} bundleIds - Bundle ids
@param {Function} callbackFn - The callback function
Subscribe to bundle load event .