[34] ワーカーは、文書を表示する主たるスレッドとは別個に動作するスクリプト実行環境です。
[205] サービスワーカーの持つ状態は、サービスワーカー参照。
[206] ワーカーの大域オブジェクトの持つ状態は、 ワーカー大域適用範囲参照。
[98] ワーカーを作成する API (new Worker
,
new SharedWorker
)
は、関係するオブジェクトを作った後 (それぞれの項を参照。)、
ワーカーを走らせる手続きを実行します。
[49] ワーカーを走らせる操作は、 次の引数を持ちます >>48。
[195] ここで、いずれかの fetch が実行されますが、そのfetchの実行で内側設定群とワーカー大域適用範囲が参照されます。
[163] いずれかの fetch の結果、非同期的に、 スクリプトを受け取って次の処理が続けることとなります。
MessagePort
オブジェクトを作成した結果に設定します。null
でない場合、type
に設定します。WorkerGlobalScope
を関連付けます。[47] WorkerGlobalScope
は、
ワーカー集合
(旧ワーカーのワーカー群)
を持ちます。
WorkerGlobalScope
の集合で、初期状態は空です。 >>42
[40] 専用ワーカーと共有ワーカーは、本項の通り実行されます。
[45] WorkerGlobalScope
は、
所有子集合
(旧ワーカーのDocument
群) を持ちます。
所有子集合は、文書または WorkerGlobalScope
の集合で、初期状態は空です。 >>42
[75] 環境設定群オブジェクト設定群の追加する関連所有子
(旧 list of relevant Document
objects to add)
は、次のようにして得られます >>42。
[76] この定義は、ワーカーを走らせる処理と共有ワーカーのコンストラクターの処理から呼び出されます。
[104] ワーカーは、 permissible worker であるか、そうでないかのいずれかです。 >>42
[79] ワーカーの WorkerGlobalScope
の所有者集合が空でない場合、
permissible worker です。 >>42
[81] 共有ワーカーの WorkerGlobalScope
の所有者集合が空となってから利用者エージェント定義の短い時間が経過していない場合で、
completely loaded でない文書の閲覧文脈が利用者エージェントに存在する場合、
permissible worker です。 >>42
[109] ワーカーは、所有者集合のいずれかが完全に活性な文書か active needed worker なら、 active needed worker です。 >>42
[113] ワーカーは、active needed worker ではなく、 permissible worker なら、 suspendable worker です >>42。
[66] 内側設定群の大域オブジェクトの closing flag が偽で、ワーカーが suspendable worker である間は、 実行を一時中断しなければなりません >>48。 その後 closing flag が真となるか、 suspendable worker でなくなったなら、一時中断を解除しなければなりません >>48。
[112] active needed worker は、次のいずれかの場合、
protected worker です >>42。
[65] ワーカーが protected worker ではなくなった後、 permissible worker でなくなるよりも前に、 ワーカー大域適用範囲の closing flag を真に設定しなければなりません >>48。
[67] 作成に引き続き、次のようにしなければなりません >>48。ServiceWorkerContainer
のクライアントメッセージキューを有効化します。
[35] Ian Hickson はワーカーの導入に当たり、 HTML5 本体とは別の Web Workers 仕様書を新たに作成しました。
[36] しかしその後 Web Workers 仕様書は Web Applications 1.0 (現在の HTML Standard) に統合され、単独の仕様書としては出版されなくなりました。
[93] 当時の仕様書最新版の URL は http://www.whatwg.org/specs/web-workers/current-work/ でした。
[88] に Web Workers のソースが HTML5 と統合されました >>87。その後は仕様書および SVN リポジトリーとしては存続していますが、 大元のソースファイルは HTML5 の SVN リポジトリーに移動しています。
[22] HTML5WorkerProposal - google-gears - Google Code ( 版) http://code.google.com/p/google-gears/wiki/HTML5WorkerProposal
[23] Worker - 素人がプログラミングを勉強するブログ ( 版) http://d.hatena.ne.jp/javascripter/20090306/1236326979
[24] IRC logs: freenode / #whatwg / 20120827 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20120827#l-596
[25] [whatwg] Feedback on Web Worker specification ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-November/038038.html
[26] [whatwg] Real-time thread support for workers ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038480.html
[27] [whatwg] Possible bug in the way the spec about worker GC behavior ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-December/041684.html
[28] [whatwg] Flow Control on Websockets ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-December/041687.html
[29] Sync IO APIs in Shared Workers ( (Jonas Sicking 著, 版)) http://lists.w3.org/Archives/Public/public-webapps/2013OctDec/0531.html
[30] Web Applications 1.0 r8405 Various editorial tweaks. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8404&to=8405
[31] Re: On starting WebWorkers with blob: URLs... ( (Jonas Sicking 著, 版)) http://lists.w3.org/Archives/Public/public-webapps/2014JanMar/0444.html
[32] Web Applications 1.0 r8837 Allow browsers to let shared workers survive navigation for a short time. ( ( 版)) https://html5.org/r/8837
[33] [webappsec] Rechartering: sandboxed cross-origin workers ( (Brad Hill 著, 版)) http://lists.w3.org/Archives/Public/public-webappsec/2014Nov/0129.html
[1]
Web Workers (2008-07-09 20:07:39 +09:00
版) http://www.whatwg.org/specs/web-workers/current-work/
(名無しさん)
[2]
Workers (Ian Hickson <ian@...> 著, 2008-07-10 01:30:50 +09:00
版) http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/14607
(名無しさん)
[3] Web Workers ( 版) http://suika.fam.cx/www/markup/html/html5/spec-ja/workers-non-normative
[4] Workers (Ian Hickson 著, 版) http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/15294
[5] Workers feedback (Ian Hickson 著, 版) http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/16498
[6] Workers feedback (Ian Hickson 著, 版) http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/16621
[7] Firefox 3.1 for developers - MDC ( 版) https://developer.mozilla.org/ja/Firefox_3.1_for_developers#.E6.96.B0.E3.81.97.E3.81.8F.E3.82.B5.E3.83.9D.E3.83.BC.E3.83.88.E3.81.95.E3.82.8C.E3.81.9F.E6.A9.9F.E8.83.BD_2
[8] Web Workers ( 版) http://www.w3.org/TR/2009/WD-workers-20090423/
[9] Web Workers ( 版) http://www.w3.org/TR/2009/WD-workers-20091029/
[10] Web Workers ( 版) http://www.w3.org/TR/2009/WD-workers-20091222/
[11] [whatwg] Web Workers feedback ( 版) http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-April/025992.html
[12] [whatwg] Workers feedback ( ( 版)) http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-February/030238.html
[13] Web Workers ( ( 版)) http://www.w3.org/TR/2011/WD-workers-20110208/
[14] Web Workers ( ( 版)) http://www.w3.org/TR/2011/WD-workers-20110310/
[15] Web Workers ( ( 版)) http://www.w3.org/TR/2011/WD-workers-20110901/
[16] New tests submitted by Microsoft for WebApps specs ( (Adrian Bateman 著, 版)) http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1406.html
[17] Web Workers ( ( 版)) http://www.w3.org/TR/2012/WD-workers-20120313/
[18] IRC logs: freenode / #whatwg / 20120403 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20120403#l-170
[19] Web Workers ( ( 版)) http://www.w3.org/TR/2012/CR-workers-20120501/
[100] [whatwg] Reporting errors during Web Worker startup ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-July/040018.html
[101] IRC logs: freenode / #whatwg / 20130711 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20130711
[20] Web Applications 1.0 r8328 for consistency, lowercase 'workers' in some references to Web workers ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8327&to=8328
[102] Web Applications 1.0 r8361 Describe what happens when you try to run a bad script as a worker ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8360&to=8361
[21] Re: [workers] Seeking status and plans ( (Simon Pieters 著, 版)) http://lists.w3.org/Archives/Public/public-test-infra/2014JulSep/0080.html
[38] AppCache の代替として、新たな種類のワーカーである Service Worker が開発されました。 Service Worker は従来のワーカーと似ている点も多く、 多くの機構を共有または継承していますが、そうでない点も多くあります。
Content Workers
A content worker is an object that is used to inject content scripts into a content process, and to provide a pipe between each content script and the main add-on script. The idea is to use a single content worker for each content process. The constructor for the content worker takes an object containing one or more named options. Among other things, this allows us to specify one or more content scripts to be loaded.
[122] Normative references to Workers. (Mike West 著, 版) https://lists.w3.org/Archives/Public/public-webapps/2015JulSep/0361.html
[123] Re: Normative references to Workers. (Arthur Barstow 著, 版) https://lists.w3.org/Archives/Public/public-webapps/2015JulSep/0367.html
[124] Integrate Fetch into HTML · whatwg/html@7c5555a ( 版) https://github.com/whatwg/html/commit/7c5555a16f2920c02244c10756bb2f1a11e87a22
[125] Web Workers ( 版) http://www.w3.org/TR/2015/WD-workers-20150924/
[127] Add 'HTTPS state' to settings objects · whatwg/html@6de5241 ( 版) https://github.com/whatwg/html/commit/6de524157fcf341e10efb3eec634bcf7325e6ee4
[128] PSA: Change the Latest Editor's Drafts of WebStorage, WebWorkers, WebMessaging, Server-Sent Events and WebSockets (Xiaoqian Wu 著, 版) https://lists.w3.org/Archives/Public/public-webapps/2015OctDec/0099.html
[130] Give workers a base URL and clean up shared workers · whatwg/html@b620471 ( 版) https://github.com/whatwg/html/commit/b620471ff823e8e6507b077cf0785a530762f5e3
[132] Add and populate global object's "CSP list" · whatwg/html@479dfbf ( 版) https://github.com/whatwg/html/commit/479dfbf1ff68b746ed3f81cc7415165e3342709e
[133] CfC: Is Web Workers Ready for CR? deadline Dec 14 (Xiaoqian Wu 著, 版) https://lists.w3.org/Archives/Public/public-webapps/2015OctDec/0182.html
[134] Rewrite global object initialization to delegate to ES · whatwg/html@cf0355d ( 版) https://github.com/whatwg/html/commit/cf0355d7e0e229b98f7fbd51b8c7608010c787f5
[155] Rewrite script execution on top of ES · whatwg/html@4891d18 ( 版) https://github.com/whatwg/html/commit/4891d18aaf2df1d40aa61f467a5a10cfc19dd85d
No one in the Web Platform Working Group is actively working on this specification. For the latest version of Web Workers use the WHATWG Living Standard.
[157] Add <script type="module"> and module resolution/fetching/evaluation · whatwg/html@cd1a9fb ( 版) https://github.com/whatwg/html/commit/cd1a9fb1e83f7d0bc30be8b34ecdaf444a0b19a4
[158] 27793 – In 10.2.6.4 "Shared workers and the SharedWorker interface", The note at Step 6 should include blob: urls. ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=27793
[159] CSP: Fix workers' CSP list initialization. · whatwg/html@05f9f32 ( 版) https://github.com/whatwg/html/commit/05f9f3266d6050b8b299ec365fdc63d5eab5b2b3
[160] URLs are parsed and produce records · whatwg/html@30bc255 ( 版) https://github.com/whatwg/html/commit/30bc2557105ad62881ec9670f253febbc9761b44
[161] Add module workers · whatwg/html@e3a5bb7 ( 版) https://github.com/whatwg/html/commit/e3a5bb757f64374c37d8c4528c01298463ef0b2a
[54] Fix #715: clarify how aborting a running script works · whatwg/html@6a48bfb ( 版) https://github.com/whatwg/html/commit/6a48bfbf1066034eab4786d62ba4017593c48430
[61] Make script fetching more correct with regard to request destinations · whatwg/html@6dc9c9e ( 版) https://github.com/whatwg/html/commit/6dc9c9e1efcc3122294fb015e4a4eea66456a611
[165] 22700 – Inline Web worker scripts ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=22700
[166] Sync with recent changes to the JS spec's job queue · whatwg/html@5af258f ( 版) https://github.com/whatwg/html/commit/5af258f33e3e2f55eb30e611cb7aee625a8bd16a
[167] Use FrozenArray for Navigator#languages and MessageEvent#ports · whatwg/html@e4df68a ( 版) https://github.com/whatwg/html/commit/e4df68a41b86753c7fcdd0d8ea4615f63ffc87e9
[168] Clarify settings object, realm, and global relationships · whatwg/html@0866f1b ( 版) https://github.com/whatwg/html/commit/0866f1b3f4b4ea5a99a30909e9bbe557dea0b460
[169] Clarify settings object, realm, and global relationships · whatwg/html@0866f1b ( 版) https://github.com/whatwg/html/commit/0866f1b3f4b4ea5a99a30909e9bbe557dea0b460
[170] 27143 – There's no reason to set a "responsible browsing context" since it is never used. Not having it for [...] ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=27143
[171] Editorial: give worker APIs introductions · whatwg/html@afab06c ( 版) https://github.com/whatwg/html/commit/afab06c9a6f48963f4713eed2c8a75324712a9b5
[172] Pass cryptographic nonce metadata to Fetch · whatwg/html@5479e07 ( 版) https://github.com/whatwg/html/commit/5479e07a6f6e01062b85b5fe6799752b0370336c
[174] Get a reference to the response correctly in worker initialization · whatwg/html@536a962 ( 版) https://github.com/whatwg/html/commit/536a96229ced274b80f78ad791c34ecfe11b289b
[129] Pass parser metadata to Fetch · whatwg/html@e6500b9 ( 版) https://github.com/whatwg/html/commit/e6500b90244376c023e7b78642dbc7b86829233f
[131] Use outside settings object to fetch workers ( (domenic著, )) https://github.com/whatwg/html/commit/4e2b0066cb88fdc7ac65cc6e6a7eb40ac39418bd
[179] Integrate with the Referrer Policy spec, part 2 of n ( (domenic著, )) https://github.com/whatwg/html/commit/176e74243c649b709b9959b7d08b327290c2f403
[180] Regression fix: add back origin check for shared workers ( (annevk著, )) https://github.com/whatwg/html/commit/18c891f1a300a336d3df5b76fdae3b1d77b0b468
[183] 29039 – Clarifications and extensions to worker semantics () https://www.w3.org/Bugs/Public/show_bug.cgi?id=29039
What we still do have is a limit on how many workers can be started. If a webpage creates 100 workers, we only start the first N workers.
The other workers aren't started until one of the N first workers dies (is GCed or closed/terminated). No exceptions are thrown for the workers that aren't immediately started, they simply wait in a stalled state and accumulate any messages sent to them.
[185] Improve all the script-fetching algorithms (domenic著, ) https://github.com/whatwg/html/commit/b4f40e72fcca8a13eefa8a2dd06258378e76fcb7#diff-36cd38f49b9afa08222c0dc9ebfe35ebR97129
[186] Service workers: enable the client message queue (jungkees著, ) https://github.com/whatwg/html/commit/d61594754338b16bbc1b9e7233600f4f6667d834
[188] Fix regression in setting up SharedWorkerGlobalScope (domenic著, ) https://github.com/whatwg/html/commit/17525591619f64962b181a4d4b3de7735c16c4c9
[190] Define how data URLs affect workers (annevk著, ) https://github.com/whatwg/html/commit/c592f62985ab9aa0e26c111a9823de5101d58c96
Tobie Langel (IE) as editor for WebIDL, Sangwhan Moon (IE) as editor for
Web Workers and HTML, Yongsheng Zhu (Alibaba) as editor for DOM, and
Brandon Jones (Google) as editor for Gamepad API.
[74] Clarify settings object, realm, and global relationships · whatwg/html@0866f1b ( 版) https://github.com/whatwg/html/commit/0866f1b3f4b4ea5a99a30909e9bbe557dea0b460
[196] Improve navigate for service worker hooks (jungkees著, ) https://github.com/whatwg/html/commit/2b93f9ec35b152e58d3e181bea8c45d789bac949
[197] Add environment's execution ready flag (jungkees著, ) https://github.com/whatwg/html/commit/d358c7814de8a053dcb8615a5d87e8c2e0e19257
[199] Change the model for workers. (mikewest著, ) https://github.com/w3c/webappsec-csp/commit/1af72ed19bf952402c514b7e7a966fb234d63217
[204] Fix classic worker scripts to be created in the correct realm (domenic著, ) https://github.com/whatwg/html/commit/11b6a37f934b528d4e5799b1cd9485e1850e3cf2
[207] Remove appcache from shared workers (domenic著, ) https://github.com/whatwg/html/commit/3f1c84d682da30be5c323a43dfcc8995aae2f731
[44] Editorial: restructure ownership of workers to parent-owners (annevk著, ) https://github.com/whatwg/html/commit/59a4750f475acd789ee436b4906972ba2081d8b3
[62] Minor cleanup in /specs/ (annevk著, ) https://github.com/whatwg/whatwg.org/commit/1742f9995187c11b53e01075613288bd031a03e2
[77] Remove overly permissive "kill a worker" algorithm (annevk著, ) https://github.com/whatwg/html/commit/77c694e25adabfc5706b5885fbcc1b0d3d5c4416
[78] The WHATWG Blog — HTML and shared memory () https://blog.whatwg.org/html-and-shared-memory
[83] Move from 'the worker's documents' to the worker's 'owner set' (mikewest著, ) https://github.com/w3c/webappsec-csp/commit/af5868735cdfcfbed09b4f7a3aee69ca6699a1cc
[84] Add a name to dedicated workers, for debugging (domenic著, ) https://github.com/whatwg/html/commit/3bb652169741d5dd94d7f1b390f6491e38d640cb
[94] Reword/drop “must"s in dev view of Workers section (sideshowbarker著, ) https://github.com/whatwg/html/commit/ff815530594e017b14961ba98186da3307b7622c
[95] Reword/drop “must"s in dev view of Workers section by sideshowbarker · Pull Request #3254 · whatwg/html () https://github.com/whatwg/html/pull/3254
[96] Editorial: "return, but continue" cleanup for downloads and Worker (annevk著, ) https://github.com/whatwg/html/commit/0217e1d4cb1ace836f6ef72a402b643aa879fbed
[97] Editorial: "return, but continue" cleanup for downloads and Worker by annevk · Pull Request #3397 · whatwg/html () https://github.com/whatwg/html/pull/3397
[99] Editorial: Define "realm execution context" in a separate step (TimothyGu著, ) https://github.com/whatwg/html/commit/b5f9ad629cb498206bd9e4144de9ec58e27fef98
[105] Editorial: Define "realm execution context" in a separate step by TimothyGu · Pull Request #3314 · whatwg/html () https://github.com/whatwg/html/pull/3314
[106] Editorial: move owner set manipulation into discarding a document (GloverDonovan著, ) https://github.com/whatwg/html/commit/a5586f115e4c982c22b4d9d583a20b26236f5991
[107] Move owner set manipulation during document discarding · Issue #2533 · whatwg/html () https://github.com/whatwg/html/issues/2533
[108] Move owner set manipulation into discarding a document by GloverDonovan · Pull Request #3473 · whatwg/html () https://github.com/whatwg/html/pull/3473
[111] clarify "WebWorkers are expensive" statement · Issue #8 · GoogleChromeLabs/tasklets () https://github.com/GoogleChromeLabs/tasklets/issues/8
[118] Add "environment discarding steps" hook (mattto著, ) https://github.com/whatwg/html/commit/9592eb5e25acde62b8832ca5fd47d87805a2acbc
[146] Discard the environment after a failed navigation or worker start. by mattto · Pull Request #3723 · whatwg/html () https://github.com/whatwg/html/pull/3723
[147] Fix calls to InitializeHostDefinedRealm (TimothyGu著, ) https://github.com/whatwg/html/commit/39c948ba5ec55677e209bc4fc631636f1e8e2baf
[148] Memorandum of Understanding Between W3C and WHATWG () https://www.w3.org/2019/04/WHATWG-W3C-MOU.html