title: What exactly does $(document).ready guarantee?
body: <p>Running my (rather complex) JavaScript/jQuery application in Google's Chrome browser, it would appear that <code>$(document).ready</code> fires while some of the JavaScript files have not yet loaded.</p>
  
  <p>The relevant code (simplified):</p>
  
  <p>In my HTML file</p>
  
  <pre><code>&lt;script&gt;var httpRoot='../../../';var verifyLoad = {};&lt;/script&gt;
  
  &lt;script src="../../../globalvars.js"&gt;&lt;/script&gt;
  &lt;script src="../../../storagekeys.js"&gt;&lt;/script&gt;
  &lt;script src="../../../geometry.js"&gt;&lt;/script&gt;
  &lt;script src="../../../md5.js"&gt;&lt;/script&gt;
  &lt;script src="../../../serialize.js"&gt;&lt;/script&gt;
  ...
  &lt;script src="../../../main.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>As the last statement of each of the .js files except main.js:</p>
  
  <pre><code>verifyLoad.FOO = true; // where FOO is a property specific to the file
  </code></pre>
  
  <p>e.g.</p>
  
  <pre><code>verifyLoad.jquerySupplements = true; 
  
  verifyLoad.serialize = true; 
  </code></pre>
  
  <p>In main.js:</p>
  
  <pre><code>$(document).ready(function() {
      function verifyLoadTest (scriptFileName, token) {
          if (!verifyLoad.hasOwnProperty(token)) {
              console.log(scriptFileName + ' not properly loaded'); 
          };
      };
      verifyLoadTest('globalvars.js', 'globalvars');
      verifyLoadTest('storagekeys.js', 'storagekeys');
      verifyLoadTest('geometry.js', 'geometry');
      verifyLoadTest('md5.js', 'geometry');
      verifyLoadTest('serialize.js', 'serialize');
      ...
  }
  </code></pre>
  
  <p>Much to my amazement, I see some of these trigger. This does not match my understanding of <code>$(document).ready</code>. What am I missing?</p>