content
content copied to clipboard
Update usage for {{AvailableInWorkers}}
the https://github.com/mdn/yari/pull/10029 brings additional ability to better reflect features' scope (and https://github.com/mdn/yari/pull/10968 which add one more case)
the issue is intended to track those features that need to update when the macros change landed (see https://github.com/mdn/yari/blob/main/kumascript/macros/AvailableInWorkers.ejs)
also reference to https://github.com/sindresorhus/globals
test with https://worker-playground.glitch.me/
the list is as follows:
### tasks
- [ ] #33477
- [ ] #33225
- [ ] #32945
- [ ] #32942
- [ ] #32949
- [ ] WebUSB API, give up
- [ ] #32944
- [ ] #30191
- [ ] #33202
- [ ] #35596
- [ ] #33044
- [ ] #33052
- [ ] #33056
- [ ] #33055
- [ ] #33061
- [ ] #33062
- [ ] #33091
- [ ] #33092
- [ ] #33093
- [ ] #33074
a full list is as follows:
- WebCodecs API, of https://w3c.github.io/webcodecs/
AudioDecoderVideoDecoderAudioEncoderVideoEncoderEncodedAudioChunkEncodedVideoChunkAudioDataVideoFrameVideoColorSpaceImageDecoderImageTrackListImageTrack- above in Window, DedicatedWorker
- WebRTC API, of https://w3c.github.io/webrtc-encoded-transform/
RTCEncodedAudioFrameRTCEncodedVideoFrameSFrameTransformErrorEventSFrameTransform- above in Window, DedicatedWorker
DedicatedWorkerGlobalScope.rtctransformKeyFrameRequestEventRTCTransformEvent- above only in DedicatedWorker
- XMLHTTPRequest API, of https://xhr.spec.whatwg.org/
XMLHttpRequestXMLHttpRequestUploadXMLHttpRequestEventTarget- both in Window, DedicatedWorker, SharedWorker
- Web Serial API, of https://wicg.github.io/serial/
WorkerNavigator.serial- only in DedicatedWorker
SerialSerialPort- both only in Window, DedicatedWorker
- WebUSB API, of https://wicg.github.io/webusb/
WorkerNavigator.usb- in DedicatedWorker, SharedWorker
USBConnectionEventUSBInTransferResultUSBOutTransferResultUSBIsochronousInTransferPacketUSBIsochronousInTransferResultUSBIsochronousOutTransferPacketUSBIsochronousOutTransferResultUSBDeviceUSBConfigurationUSBInterfaceUSBAlternateInterfaceUSBEndpoint- both in Window, DedicatedWorker, SharedWorker
- File API, of https://w3c.github.io/FileAPI/
FileReaderSync- only in DedicatedWorker, SharedWorker
URL.createObjectURL()URL.revokeObjectURL()- in Window, DedicatedWorker, SharedWorker
- File System API, of https://fs.spec.whatwg.org/
FileSystemSyncAccessHandleFileSystemFileHandle.createSyncAccessHandle()- both only in DedicatedWorker
- Web Worker API, of https://html.spec.whatwg.org/multipage/workers.html
WorkerGlobalScopeWorkerNavigatorWorkerLocation- above only in Worker
Worker, only in Window, DedicatedWorker, SharedWorkerDedicatedWorkerGlobalScope, only in DedicatedWorkerSharedWorkerGlobalScope, only in SharedWorker
- Service Worker API, of https://w3c.github.io/ServiceWorker/
ServiceWorkerGlobalScopeClientWindowClientClientsExtendableEventFetchEventExtendableMessageEvent- both only in ServiceWorker
- Cookie Store API, of https://wicg.github.io/cookie-store/
CookieStore(except forchangeevent)CookieStoreManagerServiceWorkerRegistration.cookies- above both in Window, ServiceWorker
ExtendableCookieChangeEventServiceWorkerGlobalScope.cookieStoreServiceWorkerGlobalScope: cookiechangeevent- above both only in ServiceWorker
- Notifications API, of https://notifications.spec.whatwg.org/
NotificationEventServiceWorkerGlobalScope: notificationclickeventServiceWorkerGlobalScope: notificationcloseevent- both only in ServiceWorker
- Content Index API, of https://wicg.github.io/content-index/spec/
ContentIndexEventServiceWorkerGlobalScope: contentdeleteevent- both only in ServiceWorker
- Payment Handler API, of https://w3c.github.io/payment-handler/
CanMakePaymentEventServiceWorkerGlobalScope: canmakepaymenteventPaymentRequestEventServiceWorkerGlobalScope: paymentrequestevent- both only in ServiceWorker
- Background Fetch API, of https://wicg.github.io/background-fetch/
BackgroundFetchEventBackgroundFetchUpdateUIEventServiceWorkerGlobalScope: backgroundfetchsuccesseventServiceWorkerGlobalScope: backgroundfetchfaileventServiceWorkerGlobalScope: backgroundfetchaborteventServiceWorkerGlobalScope: backgroundfetchclickevent- both only in ServiceWorker
- Web Background Synchronization API, of https://wicg.github.io/background-sync/spec/
SyncEventServiceWorkerGlobalScope: syncevent- both only in ServiceWorker
- Web Periodic Background Synchronization API, of https://wicg.github.io/periodic-background-sync/
PeriodicSyncEventServiceWorkerGlobalScope: periodicsyncevent- both only in ServiceWorker
- Push API, of https://w3c.github.io/push-api/
PushMessageDataPushEventPushSubscriptionChangeEventServiceWorkerGlobalScope: pusheventServiceWorkerGlobalScope: pushsubscriptionchangeevent- both only in ServiceWorker
@skyclouds2001 It's not easy to tell what tasks are left and when the issue could be considered done