Handling no Worker support
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 42/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript
研究方向
首先,在 issue 中提到的環境中重現 workerize 和 workerize-loader 的 Worker 建構失敗,接著檢查 Worker 初始化發生的位置。當不受支援的環境避免擲出例外,並透過 Promises 代理原始函式,同時保留預期的 API 時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
🤔 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! 👍
- 主要語言
- JavaScript
- 星號
- 4.4k
- 分支
- 86
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
developit/workerize 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 5/5 一週以上 新手友好度 25/100
-
難度 5/5 一週以上 新手友好度 20/100
-
Arrow functions未關閉
難度 5/5 一週以上 新手友好度 25/100
-
難度 5/5 一週以上 新手友好度 25/100
查看 developit/workerize 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
saadeghi/daisyui#4780 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
-
accessibility bug embed websites
難度 2/5 1-3 小時 新手友好度 78/100
quarto-dev/quarto-cli#14972 ·
維護者通常 1 天內回覆
-
has-readme needs-attention new-tool repo-verified
難度 2/5 1-3 小時 新手友好度 65/100
shanselman/TinyToolTown#834 · 2 則留言 ·
維護者通常 6 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
siderolabs/talos-design-system#16 ·
維護者通常 1 天內回覆