title: window.URL is undefined
body: <p>I have an array being populated with blobs (it works correctly) and I want to convert the <em>Blob</em> to <em>Image</em> as soon as I get the blob.</p>
  
  <pre><code>(function(index) {
  
      images[index] = new Image();
  
      xhr.onload = function() {
  
          blobs[index] = new Blob([this.response], {type: 'image/png'});
  
          console.log(index + " loaded.");
          console.log(blobs[index]); // It works as expected.
  
          (function(b) {
  
              var img = window.URL.createObjectURL(b); // window.URL is undefined.
              console.log(img); // Failed.
  
          })(blobs[index]);
  
      };
  
  })(i);
  </code></pre>
  
  <p>The anonymous function is not called immediately after the <code>console.log</code>, and it throws the error: </p>
  
  <blockquote>
    <p>TypeError: window.URL is undefined</p>
  </blockquote>
  
  <p>I'm using Firefox 17, which already features <strong>window.URL</strong>, so that's not the problem. Actually, I can use window.URL outside this function.</p>
  
  <p><strong>EDIT:</strong> I had a global scope variable called URL without value, so window.URL referred to it. (Can't self-answer due to my low reputation)</p>