Changeset 7099
- Timestamp:
- 01/26/07 17:02:53 (22 months ago)
- Location:
- branches/0.4
- Files:
-
- 2 added
- 1 removed
- 14 modified
-
buildscripts/build.xml (modified) (2 diffs)
-
buildscripts/buildUtil.js (modified) (3 diffs)
-
buildscripts/setXdDojoConfig.js (added)
-
dojo.js (modified) (2 diffs)
-
src/bootstrap2.js (deleted)
-
src/browser_debug.js (modified) (1 diff)
-
src/browser_debug_xd.js (added)
-
src/debug.js (modified) (1 diff)
-
src/hostenv_adobesvg.js (modified) (1 diff)
-
src/hostenv_browser.js (modified) (1 diff)
-
src/hostenv_jsc.js (modified) (1 diff)
-
src/hostenv_rhino.js (modified) (1 diff)
-
src/hostenv_spidermonkey.js (modified) (1 diff)
-
src/hostenv_svg.js (modified) (1 diff)
-
src/hostenv_wsh.js (modified) (1 diff)
-
src/loader_xd.js (modified) (8 diffs)
-
tests/test_bootstrap.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.4/buildscripts/build.xml
r7054 r7099 11 11 should we support these as HTML? Or just JS files? 12 12 NOTE: the following command issued from the top-level seems to work correctly: 13 perl buildscripts/jslink.pl -pre cat -i release/testUsage.js -l src/bootstrap1.js -l src/ bootstrap2.js -l src/hostenv_browser.js -l src/io/IO.js -l src/io/BrowserIO.js -o - > release/minimal.js13 perl buildscripts/jslink.pl -pre cat -i release/testUsage.js -l src/bootstrap1.js -l src/hostenv_browser.js -l src/io/IO.js -l src/io/BrowserIO.js -o - > release/minimal.js 14 14 This correctly "links" the files together, but mangles some 15 15 identifiers and places anonymous inner functions at the wrong places … … 716 716 <!-- end buildFlash task --> 717 717 718 <!-- intern-strings task --> 719 <target name="xd-dojo-config" depends="-fix-config" 720 description="Sets dojo.js to use xdomain loading and sets dojo module path to a specific URL."> 721 <java jar="./lib/custom_rhino.jar" failonerror="true" fork="true" 722 logError="true"> 723 <arg value="setXdDojoConfig.js" /> 724 <arg value="${release_dir}/dojo.js" /> 725 <arg value="${xdDojoUrl}" /> 726 </java> 727 </target> 728 <!-- end intern-strings task --> 729 718 730 <!-- xdgenRelease task --> 719 731 <target name="xdgenRelease" if="xdgenRun" depends="xdgenRemove, -set-profileFile"> -
branches/0.4/buildscripts/buildUtil.js
r7089 r7099 44 44 load("../src/loader.js"); 45 45 load("../src/hostenv_rhino.js"); 46 load("../src/bootstrap2.js");47 46 48 47 // FIXME: is this really what we want to say? … … 73 72 dojo.hostenv.loadedUris.push("../src/hostenv_"+hostenvType+".js"); 74 73 } 75 76 dojo.hostenv.loadedUris.push("../src/bootstrap2.js");77 74 78 75 if(dependencies["prefixes"]){ … … 269 266 //Make sure we have a JS string and not a Java string by using new String(). 270 267 dojoContents += new String(readFile(depList[i])) + "\r\n"; 271 if(!insertedProvideMarker && depList[i].indexOf(" bootstrap2.js") != -1){268 if(!insertedProvideMarker && depList[i].indexOf("hostenv_") != -1){ 272 269 dojoContents += "__DOJO_PROVIDE_INSERTION__"; 273 270 insertedProvideMarker = true; -
branches/0.4/dojo.js
r4950 r7099 25 25 tmps.splice(1, 0, "hostenv_browser.js"); 26 26 } 27 28 tmps.push("bootstrap2.js"); 29 27 30 28 if((this["djConfig"])&&(djConfig["baseScriptUri"])){ 31 29 var root = djConfig["baseScriptUri"]; … … 60 58 } 61 59 62 if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){63 tmps.push("debug.js");64 }65 66 if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!isRhino)&&(!isDashboard)){67 tmps.push("browser_debug.js");68 }69 70 //Support compatibility packages. Right now this only allows setting one71 //compatibility package. Might need to revisit later down the line to support72 //more than one.73 if((this["djConfig"])&&(djConfig["compat"])){74 tmps.push("compat/" + djConfig["compat"] + ".js");75 }76 77 60 var loaderRoot = root; 78 61 if((this["djConfig"])&&(djConfig["baseLoaderUri"])){ -
branches/0.4/src/browser_debug.js
r5521 r7099 1 dojo.provide("dojo.browser_debug"); 2 1 3 dojo.hostenv.loadedUris.push("../src/bootstrap1.js"); 2 4 dojo.hostenv.loadedUris.push("../src/loader.js"); 3 5 dojo.hostenv.loadedUris.push("../src/hostenv_browser.js"); 4 dojo.hostenv.loadedUris.push("../src/bootstrap2.js");5 6 dojo.hostenv._loadedUrisListStart = dojo.hostenv.loadedUris.length; 6 7 -
branches/0.4/src/debug.js
r7087 r7099 1 dojo.provide("dojo.debug"); 2 1 3 dojo.debug = function(/*...*/){ 2 4 // summary: -
branches/0.4/src/hostenv_adobesvg.js
r6372 r7099 499 499 } 500 500 */ 501 502 dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); -
branches/0.4/src/hostenv_browser.js
r6615 r7099 527 527 528 528 } //if (typeof window != 'undefined') 529 530 //Load debug code if necessary. 531 dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); 532 533 //window.widget is for Dashboard detection 534 //The full conditionals are spelled out to avoid issues during builds. 535 //Builds may be looking for require/requireIf statements and processing them. 536 dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && !djConfig["useXDomain"], "dojo.browser_debug"); 537 dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && djConfig["useXDomain"], "dojo.browser_debug_xd"); -
branches/0.4/src/hostenv_jsc.js
r3713 r7099 65 65 return System.Environment.GetCommandLineArgs()[0]; 66 66 } 67 68 dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); -
branches/0.4/src/hostenv_rhino.js
r6416 r7099 246 246 thread.start(); 247 247 } 248 249 dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); -
branches/0.4/src/hostenv_spidermonkey.js
r3713 r7099 67 67 } 68 68 69 dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); 69 70 -
branches/0.4/src/hostenv_svg.js
r6020 r7099 212 212 }; 213 213 } 214 215 dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); -
branches/0.4/src/hostenv_wsh.js
r3713 r7099 35 35 36 36 dojo.hostenv.exit = function(exitcode){ WScript.Quit(exitcode); } 37 38 dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); -
branches/0.4/src/loader_xd.js
r7077 r7099 11 11 //the xhr package until the one before it finishes loading. The text of the xhr package will be converted 12 12 //to match the format for a xd package and put in the xd load queue. 13 //You can force all packages to be treated as xd by setting the djConfig.forceXDomain. 14 this.isXDomain = djConfig.forceXDomain || false; 13 this.isXDomain = djConfig.useXDomain || false; 15 14 16 15 this.xdTimer = 0; … … 25 24 dojo.hostenv.resetXd(); 26 25 27 dojo.hostenv.createXdPackage = function(/*String*/contents ){26 dojo.hostenv.createXdPackage = function(/*String*/contents, /*String*/resourceName, /*String=*/resourcePath){ 28 27 //summary: Internal xd loader function. Creates an xd module source given an 29 28 //non-xd module contents. … … 58 57 output.push("\ndefinePackage: function(dojo){"); 59 58 output.push(contents); 60 output.push("\n}});"); 59 //Add isLocal property so we know if we have to do something different 60 //in debugAtAllCosts situations. 61 output.push("\n}, resourceName: '" + resourceName + "', resourcePath: '" + resourcePath + "'});"); 61 62 62 63 return output.join(""); //String … … 161 162 162 163 if(this.isXDomain){ 163 var pkg = this.createXdPackage(contents );164 var pkg = this.createXdPackage(contents, module, uri); 164 165 dj_eval(pkg); 165 166 }else{ … … 224 225 225 226 //Save off the package contents for definition later. 226 var contentIndex = this.xdContents.push({content: pkg.definePackage, isDefined: false}) - 1; 227 var contentIndex = this.xdContents.push({ 228 content: pkg.definePackage, 229 resourceName: pkg["resourceName"], 230 resourcePath: pkg["resourcePath"], 231 isDefined: false 232 }) - 1; 227 233 228 234 //Add provide/requires to dependency map. … … 417 423 var contents = this.xdContents[pkg.contentIndex]; 418 424 if(!contents.isDefined){ 419 this.xdDefList.push(contents.content); 425 var content = contents.content; 426 content["resourceName"] = contents["resourceName"]; 427 content["resourcePath"] = contents["resourcePath"]; 428 this.xdDefList.push(content); 420 429 contents.isDefined = true; 421 430 } … … 472 481 var defLength = this.xdDefList.length; 473 482 for(var i= 0; i < defLength; i++){ 474 //Evaluate the package to bring it into being. 475 //Pass dojo in so that later, to support multiple versions of dojo 476 //in a page, we can pass which version of dojo to use. 477 dojo.hostenv.xdDefList[i](dojo); 483 var content = dojo.hostenv.xdDefList[i]; 484 if(djConfig["debugAtAllCosts"] && content["resourceName"]){ 485 if(!this["xdDebugQueue"]){ 486 this.xdDebugQueue = []; 487 } 488 this.xdDebugQueue.push({resourceName: content.resourceName, resourcePath: content.resourcePath}); 489 }else{ 490 //Evaluate the package to bring it into being. 491 //Pass dojo in so that later, to support multiple versions of dojo 492 //in a page, we can pass which version of dojo to use. 493 content(dojo); 494 } 478 495 } 479 496 … … 494 511 this.resetXd(); 495 512 513 if(this["xdDebugQueue"] && this.xdDebugQueue.length > 0){ 514 this.xdDebugFileLoaded(); 515 }else{ 516 this.xdNotifyLoaded(); 517 } 518 } 519 520 dojo.hostenv.xdNotifyLoaded = function(){ 496 521 //Clear inflight count so we will finally do finish work. 497 522 this.inFlightCount = 0; -
branches/0.4/tests/test_bootstrap.html
r3849 r7099 9 9 <script language="JavaScript" type="text/javascript" src="../src/loader.js"></script> 10 10 <script language="JavaScript" type="text/javascript" src="../src/hostenv_browser.js"></script> 11 <script language="JavaScript" type="text/javascript" src="../src/bootstrap2.js"></script>12 11 13 12 </head>