examples/template_stealjs/steal/steal.js
function(){
			// if we don't have a current 'top' steal
			// we create one and set it up
			// to start loading its dependencies (the current pending steals)
			if(! currentCollection ){
				currentCollection = new steal.p.init();
				
				// keep a reference in case it disappears 
				var cur = currentCollection,
					// runs when a steal is starting
					go = function(){
						// indicates that a collection of steals has started
						steal.trigger("start", cur);
						when(cur,"complete", function(){
							steal.trigger("end", cur);
						});
						cur.loaded();
					};
				// if we are in rhino, start loading dependencies right away
				if(!win.setTimeout){
					go()
				}else{
					// otherwise wait a small timeout to make 
					// sure we get all steals in the current file
					setTimeout(go,0)
				}
			}
		}
function(){
			// if we don't have a current 'top' steal
			// we create one and set it up
			// to start loading its dependencies (the current pending steals)
			if(! currentCollection ){
				currentCollection = new steal.p.init();
				
				// keep a reference in case it disappears 
				var cur = currentCollection,
					// runs when a steal is starting
					go = function(){
						// indicates that a collection of steals has started
						steal.trigger("start", cur);
						when(cur,"complete", function(){
							steal.trigger("end", cur);
						});
						cur.loaded();
					};
				// if we are in rhino, start loading dependencies right away
				if(!win.setTimeout){
					go()
				}else{
					// otherwise wait a small timeout to make 
					// sure we get all steals in the current file
					setTimeout(go,0)
				}
			}
		}
function ( ) { // if we don't have a current 'top' steal // we create one and set it up // to start loading its dependencies (the current pending steals) if ( ! currentCollection ) { currentCollection = new steal . p . init ( ) ; // keep a reference in case it disappears  var cur = currentCollection , // runs when a steal is starting go = function ( ) { // indicates that a collection of steals has started steal . trigger ( "start" , cur ) ; when ( cur , "complete" , function ( ) { steal . trigger ( "end" , cur ) ; } ) ; cur . loaded ( ) ; } ; // if we are in rhino, start loading dependencies right away if ( ! win . setTimeout ) { go ( ) } else { // otherwise wait a small timeout to make  // sure we get all steals in the current file setTimeout ( go , 0 ) } } }
called after steals are added to the pending queue
called after steals are added to the pending queue