developit / developit/workerize

Handling no Worker support

未关闭
#15 2 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
4.4k
派生
87
PR 合并指标
30 天内没有已合并 PR

描述

🤔 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! 👍

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。