Commits

Scott Koon  committed 5be6efb

removed invalid test.

  • Participants
  • Parent commits 196734b
  • Tags 1.0

Comments (0)

Files changed (4)

File bootstrap-min.js

 var bootstrap=function(){function p(a,c){var b=document.createElement("script");b.setAttribute("type","text/javascript");b.src=a;b.id=c;return b}function q(a,c){var b=document.createElement("link");b.rel="stylesheet";b.type="text/css";b.href=a;b.id=c;return b}var h=[];return window.bootstrap=window.$b=function(a,c,b){function k(r,l){for(var g,i,d=0,e=h.length;d<e;){if(h[d]==a)return false;d++}if(l==="js"){g=document.getElementsByTagName("script");i="src"}else if(l==="css"){g=document.getElementsByTagName("link");
 i="href"}d=function(){for(var m=[],n=g.length;n-- >0;)n in g&&m.push(g.c);return m};e=0;for(var s=d.length;e<s;e++)if(i in d[e]&&d[e][i]==r)return false;return true}var t=document.head||document.getElementsByTagName("head")[0],o=c||"script"+Math.floor(Math.random()*1234),j=false,f=null;if(a.indexOf(".js")>-1&&k(a,"js")){h.push(a);f=p(a,o)}if(a.indexOf(".css")>-1&&k(a,"css")){h.push(a);f=q(a,o)}if(f){f.onload=function(){j=true};f.onreadystatechange=function(){if(!j)if(this.readyState=="loaded"||this.readyState==
-"completed")j=true};t.appendChild(f)}c=window.setInterval(function(){if(j){window.clearInterval(c);b!=undefined&&b()}},0)}}();
+"complete")j=true};t.appendChild(f)}c=window.setInterval(function(){if(j){window.clearInterval(c);b!=undefined&&b()}},0)}}();

File bootstrap.js

 
             scriptTag.onreadystatechange = function() {
                 if (!loaded) {
-                    if (this.readyState == "loaded" || this.readyState == "completed") {
+                    if (this.readyState == "loaded" || this.readyState == "complete") {
                         loaded = true;
                     }
                 }

File bootstrap_test.html

 <script type="text/javascript" src="bootstrap.js"></script>
 <script type="text/javascript">
     var callbackCalled = false;
-    $b("test2.js");
     $b("test.css");
     $b("test.js","test", function(){
         callbackCalled = true;
         , "Is test.js loaded with an id of 'test'?"
         , "bootstrap did not load test.js properly");
 
-
-testSuite.add(function() {
+//At some point, I'll put this test back in to see how bootstrap should handle a missing JS file
+/*testSuite.add(function() {
     var scripts = document.getElementsByTagName("script");
     for(var i = 0;i< scripts.length;i++) {
         if("src" in scripts[i] && scripts[i].src.indexOf("test2.js") > -1 ) { return true; }
     return false;    
 }
         , "Is test2.js loaded?"
-        , "bootstrap did not load test2.js properly");
+        , "bootstrap did not load test2.js properly");*/
 
 
 testSuite.add(function () {