developit / developit/workerize
Handling no Worker support
- Lingua principale
- JavaScript
- Stelle
- 4.4k
- Fork
- 87
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
🤔 Based on my first few seconds with `workerize` and `workerize-loader`:
In the situations where Workers aren't supported (IE9, Chrome w/ file:/// protocol, etc), the Worker construction fails and throws. This would force the user to try/catch the worker construction and then implement code to run in the main thread in that case (if necessary).
Rather that try/catching that and having to write that fall-back code, it could be handy if `workerize` could fail gracefully and just proxy through the original functions (wrapped in Promises to preserve the expected API).
Thoughts? I don't have a lot of experience with Workers / `workerize`, but it came to my mind so I thought I'd bring it up.
Edit: Forgot to mention that `workerize` and the loader look super cool so far, so great work! 👍
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by reproducing Worker construction failures in workerize and workerize-loader for the environments named in the issue, then inspect where Worker initialization occurs. Done means unsupported environments avoid throwing and proxy the original functions through Promises while preserving the expected API.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- frontend, web-dev
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100