Changeset 6990
- Timestamp:
- 01/04/07 17:45:19 (23 months ago)
- Files:
-
- 1 modified
-
trunk/src/loader_xd.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/loader_xd.js
r6985 r6990 20 20 this.xdDepMap = {}; 21 21 this.xdContents = []; 22 this.xdDefList = []; 22 23 } 23 24 … … 407 408 //summary: Internal xd loader function. 408 409 //Does a depth first, breadth second search and eval of required modules. 409 if(reqChain.length > 0){410 while(reqChain.length > 0){ 410 411 var req = reqChain[reqChain.length - 1]; 411 412 var pkg = this.xdDepMap[req]; … … 417 418 var contents = this.xdContents[pkg.contentIndex]; 418 419 if(!contents.isDefined){ 419 //Evaluate the package to bring it into being. 420 //Pass dojo in so that later, to support multiple versions of dojo 421 //in a page, we can pass which version of dojo to use. 422 contents.content(dojo); 420 this.xdDefList.push(contents.content); 423 421 contents.isDefined = true; 424 422 } … … 431 429 //Done with that require. Remove it and go to the next one. 432 430 reqChain.pop(); 433 this.xdEvalReqs(reqChain);434 431 } 435 432 } … … 473 470 474 471 this.xdWalkReqs(); 472 473 var defLength = this.xdDefList.length; 474 for(var i= 0; i < defLength; i++){ 475 //Evaluate the package to bring it into being. 476 //Pass dojo in so that later, to support multiple versions of dojo 477 //in a page, we can pass which version of dojo to use. 478 dojo.hostenv.xdDefList[i](dojo); 479 } 475 480 476 481 //Evaluate any packages that were not evaled before.