|
9 | 9 | // 'window_and_worker_except_service': all workers but ServiceWorker (and in Window)
|
10 | 10 | // 'worker_except_service': all workers but ServiceWorker (and no window)
|
11 | 11 | // 'window_and_service': only in ServiceWorker (and in Window)
|
12 |
| -// 'service': only in ServiceWorker |
13 |
| -// null: (default) All workers (and Window) |
| 12 | +// 'service': only in ServiceWorker |
| 13 | +// 'worker': All workers (and no Window) |
| 14 | +// null: (default) All workers (and in Window) |
14 | 15 | //
|
15 | 16 | // {{AvailableInWorkers}}
|
16 | 17 | // {{AvailableInWorkers("worker_except_service")}}
|
@@ -40,6 +41,11 @@ const textDefault = mdn.localString({
|
40 | 41 | "ru": `Эта возможность доступна в <a href="/${locale}/docs/Web/API/Web_Workers_API">Web Workers</a>.`,
|
41 | 42 | });
|
42 | 43 |
|
| 44 | +const textWorker = mdn.localString({ |
| 45 | + "en-US": `This feature is only available in <a href="/${locale}/docs/Web/API/Web_Workers_API">Web Workers</a>.`, |
| 46 | + "zh-CN": `此特性仅在 <a href="/${locale}/docs/Web/API/Web_Workers_API">Web Worker</a> 中可用。`, |
| 47 | +}); |
| 48 | +
|
43 | 49 | const textNotService = mdn.localString({
|
44 | 50 | "en-US": `This feature is available in <a href="/${locale}/docs/Web/API/Web_Workers_API">Web Workers</a>, except for <a href="/${locale}/docs/Web/API/Service_Worker_API">Service Workers</a>.`,
|
45 | 51 | "zh-CN": `此特性在 <a href="/${locale}/docs/Web/API/Web_Workers_API">Web Worker</a>(不包括 <a href="/${locale}/docs/Web/API/Service_Worker_API">Service Worker</a>)中可用。`,
|
@@ -75,6 +81,7 @@ const workerType = $0 || 'default';
|
75 | 81 |
|
76 | 82 | const associatedText = {
|
77 | 83 | default: () => textDefault,
|
| 84 | + worker: () => textWorker, |
78 | 85 | window_and_worker_except_service: () => textNotService,
|
79 | 86 | worker_except_service: () => textNotServiceNotWindow,
|
80 | 87 | window_and_dedicated: () => textDedicated,
|
|
0 commit comments