Variável global no trabalhador da Web
Eu estou usando este trabalhador da Web que tem uma variável global declarada nele. Posso acessar o mesmo (variável Global no worker 1) no trabalhador da Web recém-criado (worker 2)?
Quando eu tentei usar o jQuery no web worker, recebo o erro "janela não está definida". Existe alguma maneira de usar jQuery em umWeb Worker
?
importScripts('jquery-latest.js'); function fetch_ajax(url) { $.ajax({ type: 'GET', url: url, success: function(response) { postMessage(response); } }); } fetch_ajax('test.txt');