content icon indicating copy to clipboard operation
content copied to clipboard

Update {{AvailableInWorkers}} macros usage for Service Worker API - part I

Open skyclouds2001 opened this issue 1 year ago • 2 comments

Description

Update usage for {{AvailableInWorkers}} for Service Worker API


in most current browser implement, register service worker is only available in window global scope (for chromium and firefox)

that is, though ServiceWorker, ServiceWorkerRegistration, ServiceWorkerContainer, NavigationPreloadManager should expose to both Window and ServiceWorker according to the specification, and WorkerNavigator.serviceWorker should expose to all kinds of worker

ServiceWorker, NavigationPreloadManager (for firefox) and ServiceWorkerRegistration (for firefox) is not exposed to DedicatedWorker and SharedWorker, WorkerNavigator.serviceWorker and ServiceWorkerContainer is not exposed to all kinds of worker

test using https://worker-playground.glitch.me/


some related browser issues includes:

  • https://issues.chromium.org/issues/40364838
  • https://bugzilla.mozilla.org/show_bug.cgi?id=1113522
  • https://bugzilla.mozilla.org/show_bug.cgi?id=1131324

Motivation

Additional details

Related issues and pull requests

part of the #31675

skyclouds2001 avatar Apr 11 '24 15:04 skyclouds2001

Leaving it open to allow @hamishwillee to do his rereview.

teoli2003 avatar May 07 '24 14:05 teoli2003