title: Javascript window is undefined
body: <p>Here is some of my javascript:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>(function(window) {
    window.file = {};
    file.i = 0;
    
    for(;;) {
       if(file.i++ &gt;= 10) break;
       document.body.appendChild(document.createTextNode(file.i))
    } 
    
   
  }) ();</code></pre>
  </div>
  </div>
  </p>
  
  <p>Why is window undefined?</p>