Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

187
Visualizações
Safari on ios v15.0 and web Worker

I got a web worker work perfectly on all navigator except my favorite one. "Safari". The result is totaly random. Sometime it's work, sometime not, and i really not understand why.

My code is sample, but i probably do something wrong .. Any idea ?

Main.js

function CreateWorker(){
return new Promise((resolve, reject) => {
     const w = new Worker("worker.js");
     w.onmessage = function (args) { alert("work fine");};
     w.onerror = function(e){ alert("error");};
     w.postMessage({ Size : 1280});
});

}
CreateWorker();

Worker.js

onmessage = function (args) {
postMessage({ Msg : "Received"});
}

So if i test it on multiple browser everyting work fine, but safari always give random result. Is it possible it's a cache story, or something i miss somewhere ?

Is it possible the worker is not finish to load the file, and are not ready to received the message ? If yes, is there a way to validate that the worker is ready to received a message ?

Thanks for your help.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda