From 608e7b8aca1f8d42640b76ba87cea9b5eeec7f2c Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Sun, 16 Feb 2025 18:50:36 +0100 Subject: [PATCH 1/5] Add dedicated worker feature --- features/dedicated-workers.yml | 38 +++++++ features/dedicated-workers.yml.dist | 166 ++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 features/dedicated-workers.yml create mode 100644 features/dedicated-workers.yml.dist diff --git a/features/dedicated-workers.yml b/features/dedicated-workers.yml new file mode 100644 index 00000000000..3d3057edcca --- /dev/null +++ b/features/dedicated-workers.yml @@ -0,0 +1,38 @@ +name: Dedicated workers +description: The `Worker()` constructor runs a script in its own thread, which can send and receive messages with the script that created it. Also known as web workers. +spec: https://html.spec.whatwg.org/multipage/workers.html#workers +caniuse: webworkers +status: + compute_from: api.WorkerGlobalScope.importScripts +compat_features: + - api.DedicatedWorkerGlobalScope + - api.DedicatedWorkerGlobalScope.close + - api.DedicatedWorkerGlobalScope.name + - api.Worker + - api.Worker.Worker + - api.Worker.Worker.mime_checks + - api.Worker.Worker.options_name_parameter + - api.Worker.error_event + - api.Worker.terminate + - api.Worker.worker_support + - api.WorkerGlobalScope + - api.WorkerGlobalScope.error_event + - api.WorkerGlobalScope.importScripts + - api.WorkerGlobalScope.importScripts.mime_checks + - api.WorkerGlobalScope.location + - api.WorkerGlobalScope.navigator + - api.WorkerGlobalScope.rejectionhandled_event + - api.WorkerGlobalScope.self + - api.WorkerGlobalScope.unhandledrejection_event + - api.WorkerLocation + - api.WorkerLocation.hash + - api.WorkerLocation.host + - api.WorkerLocation.hostname + - api.WorkerLocation.href + - api.WorkerLocation.origin + - api.WorkerLocation.pathname + - api.WorkerLocation.port + - api.WorkerLocation.protocol + - api.WorkerLocation.search + - api.WorkerLocation.toString + - api.WorkerNavigator diff --git a/features/dedicated-workers.yml.dist b/features/dedicated-workers.yml.dist new file mode 100644 index 00000000000..05d09008899 --- /dev/null +++ b/features/dedicated-workers.yml.dist @@ -0,0 +1,166 @@ +# Generated from: dedicated-workers.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: high + baseline_low_date: 2015-07-29 + baseline_high_date: 2018-01-29 + support: + chrome: "4" + chrome_android: "18" + edge: "12" + firefox: "4" + firefox_android: "4" + safari: "4" + safari_ios: "5" +compat_features: + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "2" + # chrome_android: "18" + # edge: "12" + # firefox: "3.5" + # firefox_android: "4" + # safari: "4" + # safari_ios: "5" + - api.Worker + - api.Worker.terminate + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "4" + # chrome_android: "18" + # edge: "12" + # firefox: "3.5" + # firefox_android: "4" + # safari: "4" + # safari_ios: "5" + - api.DedicatedWorkerGlobalScope + - api.DedicatedWorkerGlobalScope.close + - api.Worker.Worker + - api.Worker.error_event + - api.WorkerGlobalScope + - api.WorkerGlobalScope.error_event + - api.WorkerGlobalScope.location + - api.WorkerLocation + - api.WorkerLocation.hash + - api.WorkerLocation.host + - api.WorkerLocation.hostname + - api.WorkerLocation.href + - api.WorkerLocation.pathname + - api.WorkerLocation.port + - api.WorkerLocation.protocol + - api.WorkerLocation.search + - api.WorkerLocation.toString + - api.WorkerNavigator + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "4" + # chrome_android: "18" + # edge: "12" + # firefox: "3.5" + # firefox_android: "34" + # safari: "4" + # safari_ios: "5" + - api.WorkerGlobalScope.self + + # ⬇️ Same status as overall feature ⬇️ + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "4" + # chrome_android: "18" + # edge: "12" + # firefox: "4" + # firefox_android: "4" + # safari: "4" + # safari_ios: "5" + - api.WorkerGlobalScope.importScripts + + # baseline: high + # baseline_low_date: 2016-09-20 + # baseline_high_date: 2019-03-20 + # support: + # chrome: "38" + # chrome_android: "38" + # edge: "14" + # firefox: "29" + # firefox_android: "29" + # safari: "10" + # safari_ios: "10" + - api.WorkerLocation.origin + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "4" + # chrome_android: "18" + # edge: "17" + # firefox: "3.5" + # firefox_android: "4" + # safari: "4" + # safari_ios: "5" + - api.WorkerGlobalScope.navigator + + # baseline: high + # baseline_low_date: 2019-03-25 + # baseline_high_date: 2021-09-25 + # support: + # chrome: "70" + # chrome_android: "70" + # edge: "18" + # firefox: "55" + # firefox_android: "55" + # safari: "12.1" + # safari_ios: "12.2" + - api.DedicatedWorkerGlobalScope.name + - api.Worker.Worker.options_name_parameter + + # baseline: high + # baseline_low_date: 2020-07-28 + # baseline_high_date: 2023-01-28 + # support: + # chrome: "49" + # chrome_android: "49" + # edge: "79" + # firefox: "69" + # firefox_android: "79" + # safari: "11" + # safari_ios: "11" + - api.WorkerGlobalScope.rejectionhandled_event + - api.WorkerGlobalScope.unhandledrejection_event + + # baseline: low + # baseline_low_date: 2022-09-12 + # support: + # chrome: "71" + # chrome_android: "71" + # edge: "79" + # firefox: "67" + # firefox_android: "67" + # safari: "16" + # safari_ios: "16" + - api.WorkerGlobalScope.importScripts.mime_checks + + # baseline: false + # support: + # firefox: "81" + # firefox_android: "81" + # safari: "16" + # safari_ios: "16" + - api.Worker.Worker.mime_checks + + # baseline: false + # support: + # firefox: "34" + # firefox_android: "34" + - api.Worker.worker_support From 656d45d0717eaff1e03dcf9a9e142ff05632f632 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Sun, 16 Feb 2025 18:53:47 +0100 Subject: [PATCH 2/5] Add key to messageerror feature --- features/messageerror.yml | 12 ++++++++++++ features/messageerror.yml.dist | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/features/messageerror.yml b/features/messageerror.yml index 056413958ee..888bb57eace 100644 --- a/features/messageerror.yml +++ b/features/messageerror.yml @@ -4,3 +4,15 @@ spec: - https://html.spec.whatwg.org/multipage/indices.html#event-messageerror - https://w3c.github.io/ServiceWorker/#eventdef-serviceworkerglobalscope-messageerror group: messaging +status: + compute_from: + - api.DedicatedWorkerGlobalScope.messageerror_event + - api.MessagePort.messageerror_event + - api.ServiceWorkerContainer.messageerror_event + - api.Window.messageerror_event +compat_features: + - api.DedicatedWorkerGlobalScope.messageerror_event + - api.MessagePort.messageerror_event + - api.ServiceWorkerContainer.messageerror_event + - api.Window.messageerror_event + - api.Worker.messageerror_event diff --git a/features/messageerror.yml.dist b/features/messageerror.yml.dist index 707c230312a..749d43643a2 100644 --- a/features/messageerror.yml.dist +++ b/features/messageerror.yml.dist @@ -39,3 +39,11 @@ compat_features: # safari: "16.4" # safari_ios: "16.4" - api.ServiceWorkerContainer.messageerror_event + + # baseline: false + # support: + # firefox: "57" + # firefox_android: "57" + # safari: "16.4" + # safari_ios: "16.4" + - api.Worker.messageerror_event From f46c3012883ab910f03c3131851fb19431a94d1a Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Sun, 16 Feb 2025 19:03:15 +0100 Subject: [PATCH 3/5] Add shared worker feature --- features/shared-workers.yml | 17 ++++++++++ features/shared-workers.yml.dist | 55 ++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 features/shared-workers.yml create mode 100644 features/shared-workers.yml.dist diff --git a/features/shared-workers.yml b/features/shared-workers.yml new file mode 100644 index 00000000000..c2dedc9ec49 --- /dev/null +++ b/features/shared-workers.yml @@ -0,0 +1,17 @@ +name: Shared worker +description: The `SharedWorker()` constructor runs a script in its own thread, which can send and receive messages with other scripts running at the same origin. +spec: https://html.spec.whatwg.org/multipage/workers.html#shared-workers-introduction +caniuse: sharedworkers +status: + compute_from: api.SharedWorker +compat_features: + - api.SharedWorker + - api.SharedWorker.SharedWorker + - api.SharedWorker.SharedWorker.mime_checks + - api.SharedWorker.SharedWorker.options_name_parameter + - api.SharedWorker.error_event + - api.SharedWorker.port + - api.SharedWorkerGlobalScope + - api.SharedWorkerGlobalScope.close + - api.SharedWorkerGlobalScope.connect_event + - api.SharedWorkerGlobalScope.name diff --git a/features/shared-workers.yml.dist b/features/shared-workers.yml.dist new file mode 100644 index 00000000000..9b5ba95d91c --- /dev/null +++ b/features/shared-workers.yml.dist @@ -0,0 +1,55 @@ +# Generated from: shared-workers.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "5" + edge: "79" + firefox: "29" + firefox_android: "33" + safari: "16" + safari_ios: "16" +compat_features: + # baseline: false + # support: + # chrome: "4" + # edge: "79" + # firefox: "29" + # firefox_android: "29" + # safari: "16" + # safari_ios: "16" + - api.SharedWorkerGlobalScope + - api.SharedWorkerGlobalScope.close + - api.SharedWorkerGlobalScope.connect_event + - api.SharedWorkerGlobalScope.name + + # ⬇️ Same status as overall feature ⬇️ + # baseline: false + # support: + # chrome: "5" + # edge: "79" + # firefox: "29" + # firefox_android: "33" + # safari: "16" + # safari_ios: "16" + - api.SharedWorker + - api.SharedWorker.SharedWorker + - api.SharedWorker.error_event + - api.SharedWorker.port + + # baseline: false + # support: + # chrome: "70" + # edge: "79" + # firefox: "55" + # firefox_android: "55" + - api.SharedWorker.SharedWorker.options_name_parameter + + # baseline: false + # support: + # firefox: "81" + # firefox_android: "81" + # safari: "16" + # safari_ios: "16" + - api.SharedWorker.SharedWorker.mime_checks From 20864a19d6e9fa128a27ecd27c328bb5d5bd6684 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Mon, 17 Feb 2025 13:32:50 +0100 Subject: [PATCH 4/5] Add group for workers-related features --- features/audio-worklet.yml | 4 +++- features/dedicated-workers.yml | 1 + features/js-modules-service-workers.yml | 4 +++- features/js-modules-shared-workers.yml | 4 +++- features/js-modules-workers.yml | 4 +++- features/request-animation-frame-workers.yml | 1 + features/service-workers.yml | 2 +- features/shared-workers.yml | 1 + groups/workers.yml | 2 ++ 9 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 groups/workers.yml diff --git a/features/audio-worklet.yml b/features/audio-worklet.yml index 25c69ef564b..940c0598c97 100644 --- a/features/audio-worklet.yml +++ b/features/audio-worklet.yml @@ -1,7 +1,9 @@ name: AudioWorklet description: The `AudioWorklet` API runs module code in a separate thread, specifically for non-blocking, low latency audio processing. spec: https://webaudio.github.io/web-audio-api/#AudioWorklet -group: web-audio +group: + - web-audio + - workers compat_features: - api.AudioWorklet - api.AudioWorkletGlobalScope diff --git a/features/dedicated-workers.yml b/features/dedicated-workers.yml index 3d3057edcca..d4e35d5c93e 100644 --- a/features/dedicated-workers.yml +++ b/features/dedicated-workers.yml @@ -2,6 +2,7 @@ name: Dedicated workers description: The `Worker()` constructor runs a script in its own thread, which can send and receive messages with the script that created it. Also known as web workers. spec: https://html.spec.whatwg.org/multipage/workers.html#workers caniuse: webworkers +group: workers status: compute_from: api.WorkerGlobalScope.importScripts compat_features: diff --git a/features/js-modules-service-workers.yml b/features/js-modules-service-workers.yml index a0d86914c5c..abcfbf5aee9 100644 --- a/features/js-modules-service-workers.yml +++ b/features/js-modules-service-workers.yml @@ -1,4 +1,6 @@ name: JavaScript modules in service workers description: 'The `navigator.serviceWorker.register()` method accepts `{ type: "module" }` to load scripts that use `import` and `export`. Also known as ECMAScript modules or ESM in service workers.' spec: https://w3c.github.io/ServiceWorker/#dom-registrationoptions-type -group: js-modules +group: + - js-modules + - workers diff --git a/features/js-modules-shared-workers.yml b/features/js-modules-shared-workers.yml index bcd43164f06..2f01e402304 100644 --- a/features/js-modules-shared-workers.yml +++ b/features/js-modules-shared-workers.yml @@ -1,4 +1,6 @@ name: JavaScript modules in shared workers description: 'The `SharedWorker()` constructor accepts `{ type: "module" }` to load scripts that use `import` and `export`. Also known as ECMAScript modules or ESM in shared workers.' spec: https://html.spec.whatwg.org/multipage/workers.html#shared-workers-and-the-sharedworker-interface:dom-sharedworker-2 -group: js-modules +group: + - js-modules + - workers diff --git a/features/js-modules-workers.yml b/features/js-modules-workers.yml index cea80f8024a..aa86ee5adc3 100644 --- a/features/js-modules-workers.yml +++ b/features/js-modules-workers.yml @@ -1,4 +1,6 @@ name: JavaScript modules in workers description: 'The `Worker()` constructor accepts `{ type: "module" }` to load scripts that use `import` and `export`. Also known as ECMAScript modules or ESM in workers.' spec: https://html.spec.whatwg.org/multipage/workers.html#dom-worker-dev -group: js-modules +group: + - js-modules + - workers diff --git a/features/request-animation-frame-workers.yml b/features/request-animation-frame-workers.yml index 0eb9aa5cbb0..5e624b00b89 100644 --- a/features/request-animation-frame-workers.yml +++ b/features/request-animation-frame-workers.yml @@ -1,3 +1,4 @@ name: requestAnimationFrame() in workers description: The `requestAnimationFrame()` method in workers schedules a function that runs before the next repaint. Together with offscreen canvas, you can animate content from a worker. spec: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames +group: workers diff --git a/features/service-workers.yml b/features/service-workers.yml index 432cd00fad2..de6345e7c82 100644 --- a/features/service-workers.yml +++ b/features/service-workers.yml @@ -2,7 +2,7 @@ name: Service workers description: The service worker of a website is a script that runs in its own thread and which acts as local proxy that intercepts network requests from the website. Use a service worker to implement advanced caching strategies, offline support, background tasks, or push notification support on your website. spec: https://w3c.github.io/ServiceWorker/ caniuse: serviceworkers -# Status computed to match Caniuse. +group: workers status: compute_from: - api.ServiceWorkerContainer.register diff --git a/features/shared-workers.yml b/features/shared-workers.yml index c2dedc9ec49..8c5f1cf81c0 100644 --- a/features/shared-workers.yml +++ b/features/shared-workers.yml @@ -2,6 +2,7 @@ name: Shared worker description: The `SharedWorker()` constructor runs a script in its own thread, which can send and receive messages with other scripts running at the same origin. spec: https://html.spec.whatwg.org/multipage/workers.html#shared-workers-introduction caniuse: sharedworkers +group: workers status: compute_from: api.SharedWorker compat_features: diff --git a/groups/workers.yml b/groups/workers.yml new file mode 100644 index 00000000000..31770bafb86 --- /dev/null +++ b/groups/workers.yml @@ -0,0 +1,2 @@ +# Features for running scripts alongside the main thread (i.e., workers and worklets) +name: Workers From 3dd46a52be3a91f0a48c5b5bf61cfcff3b18c794 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Wed, 26 Feb 2025 15:08:17 +0100 Subject: [PATCH 5/5] Assign worklet keys --- features/audio-worklet.yml | 3 +++ features/audio-worklet.yml.dist | 15 +++++++++++++++ features/js-modules.yml | 1 + features/js-modules.yml.dist | 12 ++++++++++++ 4 files changed, 31 insertions(+) diff --git a/features/audio-worklet.yml b/features/audio-worklet.yml index 940c0598c97..d21191b5d89 100644 --- a/features/audio-worklet.yml +++ b/features/audio-worklet.yml @@ -20,3 +20,6 @@ compat_features: - api.AudioWorkletProcessor.AudioWorkletProcessor - api.AudioWorkletProcessor.port - api.BaseAudioContext.audioWorklet + - api.Worklet + - api.Worklet.addModule + - api.WorkletGlobalScope diff --git a/features/audio-worklet.yml.dist b/features/audio-worklet.yml.dist index cb7f2e32a0b..6c8239aa6fd 100644 --- a/features/audio-worklet.yml.dist +++ b/features/audio-worklet.yml.dist @@ -29,6 +29,21 @@ compat_features: - api.AudioWorkletProcessor.AudioWorkletProcessor - api.AudioWorkletProcessor.port + # baseline: high + # baseline_low_date: 2021-04-26 + # baseline_high_date: 2023-10-26 + # support: + # chrome: "65" + # chrome_android: "65" + # edge: "79" + # firefox: "76" + # firefox_android: "79" + # safari: "14.1" + # safari_ios: "14.5" + - api.Worklet + - api.Worklet.addModule + - api.WorkletGlobalScope + # ⬇️ Same status as overall feature ⬇️ # baseline: high # baseline_low_date: 2021-04-26 diff --git a/features/js-modules.yml b/features/js-modules.yml index b80b245dbf7..965231ed6c4 100644 --- a/features/js-modules.yml +++ b/features/js-modules.yml @@ -13,6 +13,7 @@ status: - javascript.statements.export - javascript.statements.import compat_features: + - api.Worklet.ecmascript_modules - html.elements.script.nomodule - html.elements.script.type.module - javascript.statements.export diff --git a/features/js-modules.yml.dist b/features/js-modules.yml.dist index c65cefb2fd0..49728b707ea 100644 --- a/features/js-modules.yml.dist +++ b/features/js-modules.yml.dist @@ -95,6 +95,18 @@ compat_features: # safari_ios: "16.4" - javascript.operators.import_meta.resolve + # baseline: low + # baseline_low_date: 2023-06-06 + # support: + # chrome: "80" + # chrome_android: "80" + # edge: "80" + # firefox: "114" + # firefox_android: "114" + # safari: "15" + # safari_ios: "15" + - api.Worklet.ecmascript_modules + # baseline: false # support: # chrome: "123"