Why was HTML5 Web Workers support removed from the Android browser in versions 2.2 and up?

前端 未结 3 1479
北海茫月
北海茫月 2021-02-03 18:40

I\'m trying to learn something about JavaScript threading. And from a tutorial I learned about HTML5 API web worker. This API enables JavaScript multi-threading. So I start to f

相关标签:
3条回答
  • 2021-02-03 19:22

    from config.h of Android 2.2.


    commit 68698168e7547cc10660828f1fb82be7a8efa845

    Author: Steve Block

    Date: Wed Mar 17 14:37:19 2010 +0000

    Disable workers

    This is because V8 on Android does not have the required locking. Also disables channel messaging, which is used only with workers.

    Bug: 2522239

    Change-Id: I6cb91b4048c7e1a0351e422561625397a2e98986


    via http://code.google.com/p/android/issues/detail?id=10004#c7

    0 讨论(0)
  • 2021-02-03 19:24
    • Web Workers are available again on the built-in Android Browser since 4.4
    • Shared Workers are still unsupported on both Android Browser and Chrome for Android.
    0 讨论(0)
  • 2021-02-03 19:35

    Regarding when the API will be available, Web Workers (but not shared workers) are now available in Chrome Mobile, available only for ICS (Android 4.0) and higher devices.

    Note that the built-in browser on Android 4 does not support workers; you must install Chrome.

    0 讨论(0)
提交回复
热议问题