専用ワーカー

Worker インターフェイス (DOM)

[24] Worker インターフェイスは、 専用ワーカーを作成し、通信するための API を提供するものです。

[25] ワーカー一般についてはワーカーの項を参照。

仕様書

Worker インターフェイス

状態

[1] EventTarget の状態に加えて、次の状態があります。

関連付けられたワーカー
暗黙の MessagePort

構築子

[3] Worker 構築子は、次のようにしなければなりません >>2

  1. [4] 次の引数が指定されたものとして解釈します。
    番地
    USVString (必須)
    オプション群
    WorkerOptions (省略可能)
  2. [5] 利用者エージェントの方針次第で SecurityError 例外投げて停止しても構いません。
  3. [10] 外側設定群を、現職設定群オブジェクトに設定します。
  4. [6] ワーカーURLを、 番地外側設定群に対して構文解析した結果に設定します。
  5. [7] ワーカーURLが失敗なら、
    1. [16] SyntaxError 例外投げて停止します。
  6. [12] ワーカーを、新しい Worker に設定します。
  7. [14] 外側ポートを、 所有者外側設定群として新しいMessagePortオブジェクトを作成した結果に設定します。
  8. [9] 外側ポートワーカーと関連付けます。
  9. [27] 外側ポート出荷します。 仕様書になし
  10. [17] ワーカーを返します。

[15] 利用者エージェントの方針とは、例えばこのページではワーカーを認めない、 といったような指定を想定している >>2 ようです。

[18] 更に、並列に、次のようにしなければなりません >>2

  1. [23] ワーカを走らせます
    ワーカー
    ワーカー
    URL
    ワーカーURL
    外側設定群
    外側設定群
    外側ポート
    外側ポート
    オプション群
    オプション群

DedicatedWorkerGlobalScope インターフェイス

状態

[30] WorkerGlobalScope 参照。

メンバー

[29] WorkerGlobalScope 参照。

専用ワーカーエージェント

[33] 専用 (せんよう) ワーカーエージェント (dedicated worker agent) は、 DedicatedWorkerGlobalScope を1つ含むエージェントです。 >>32

歴史

[8] Fix #337: perform origin checks for workers in Fetch · whatwg/html@e86b2e4 ( 版) https://github.com/whatwg/html/commit/e86b2e4b8fdef45404c61c1a85c40da7edf8b561

[19] Rewrite global object initialization to delegate to ES · whatwg/html@cf0355d ( 版) https://github.com/whatwg/html/commit/cf0355d7e0e229b98f7fbd51b8c7608010c787f5

[20] Add module workers · whatwg/html@e3a5bb7 ( 版) https://github.com/whatwg/html/commit/e3a5bb757f64374c37d8c4528c01298463ef0b2a

[21] Make script fetching more correct with regard to request destinations · whatwg/html@6dc9c9e ( 版) https://github.com/whatwg/html/commit/6dc9c9e1efcc3122294fb015e4a4eea66456a611

[22] Use outside settings object to fetch workers ( (domenic著, )) https://github.com/whatwg/html/commit/4e2b0066cb88fdc7ac65cc6e6a7eb40ac39418bd

[11] Use USVString for all URLs ( (domenic著, )) https://github.com/whatwg/html/commit/018b983b77b2cd908f6d00100e7e0abe893dd2c3

[13] Use current instead of incumbent + entry in worker constructors (domenic著, ) https://github.com/whatwg/html/commit/485c76a84611d094839b3b60d13e6e997594800b

[28] Define agents and agent clusters (annevk著, ) https://github.com/whatwg/html/commit/4db86547f1184e7ceb4f1009cb3bef28101eda4f

[31] Add a name to dedicated workers, for debugging (domenic著, ) https://github.com/whatwg/html/commit/3bb652169741d5dd94d7f1b390f6491e38d640cb