Commits

Scott Koon  committed 9165174

A test caught a problem when assigning an id to a script.

  • Participants
  • Parent commits 2c57678

Comments (0)

Files changed (2)

File bootstrap.js

         }
 
         var head = document.head || document.getElementsByTagName("head")[0];
-        var scriptId = (function() { if(args.length==2) { return args[1];} else {return false;}})() || "script" + Math.floor(Math.random() * 1234);
+        var scriptId = args[1] || "script" + Math.floor(Math.random() * 1234);
         var loaded = false;
         var scriptTag = null;
-        var callback = null;
-        if(args.length == 3) callback = args[2];
+        var callback = callback = args[2] || null;
 
         function notLoaded(src, type) {
             var nodeList;
 
 testSuite.add(function() {
     var scripts = document.getElementsByTagName("script");
-    return (scripts.length==3);
+    return (scripts.length==5);
 }
-        , "Are all 4 scripts loaded?"
-        , "All 4 scripts are not loaded.")
+        , "Are all 5 scripts loaded?"
+        , "All 5 scripts are not loaded.")
 testSuite.add(function() {
     return ( document.getElementById("test") != null )
 }