title: Global variable in Web worker
body: <p>I am using this Web worker which has a Global variable declared in it. Can I access the same (Global variable in worker 1) in the newly spawned web worker(worker 2)?</p>
  <p>When I've tried using jQuery in web worker, I get error &quot;window is not defined&quot;. Is there any way to use jQuery in a <code>Web Worker</code>?</p>
  <pre><code>importScripts('jquery-latest.js');
  
  function fetch_ajax(url) {
    $.ajax({
      type: 'GET', 
      url: url,
      success: function(response) {
      postMessage(response);  
  
  
      }
    });
  }
  
  fetch_ajax('test.txt');
  </code></pre>