title: importScripts returns undefined in the web workers
body: <p>For earlier browser versions, Promise is undefined in web workers. So I am using a <a href="https://github.com/taylorhakes/promise-polyfill" rel="nofollow">polyfill Promise</a> by importScripts('Promise.js'), if Promise is undefined. But still I get an undefined object in return.</p>
  
  <pre><code>var promise;
  if(typeof Promise === undefined) {
    self.importScripts('./Promise.js').Promise;
  }
  
  promise = new Promise(function (resolve, reject) {
    var url = ajaxArgs.url || '',
        data = ajaxArgs.data || {},
        type = ajaxArgs.method || 'GET',
        isGet = type === 'GET',
        request = new XMLHttpRequest();
        ........
  }
  </code></pre>
  
  <p>How can I make this work for web workers?</p>