title: console.log doesn't execute within callback but alert() does?
body: <p>I'm scratching my head rather heavily over this one. So I have a JS script that needs to execute after another script so I've injected it into the head with a callback. Here's a snippet of the code that works, it pops up with the alert after loading the initial script.</p>
  
  <pre><code>    loadBackupScript(function() { 
      alert('test'); 
  });
  </code></pre>
  
  <p>But merely changing the alert to console.log (see below) seems to break the functionality, it doesn't throw up any errors, just fails to log anything in the console. Anything more complex within the anonymous function appears to do the same. Any ideas?</p>
  
  <pre><code>    loadBackupScript(function() { 
      console.log('test'); 
  });
  </code></pre>
  
  <p>Edit: Here's the loadBackupScript function, but I'm certain it's not a problem with this as it executes an alert perfectly fine.</p>
  
  <pre><code>function loadBackupScript(callback) {
    var script;
     if (typeof callback !== 'function') {
        throw new Error('Not a valid callback');  
     }
     script = document.createElement('script');
     script.onload = callback; 
     script.src = '/SiteAssets/Kent Normal1.js';
     document.head.appendChild(script);
  }
  </code></pre>