Shared worker
Limited availability
Tags:
api
Groups:
Workers
The SharedWorker()
constructor runs a script in its own thread, which can send and receive messages with other scripts running at the same origin.
Learning resources on MDN
- SharedWorker
- SharedWorker: SharedWorker() constructor
- SharedWorker: error event
- SharedWorker: port property
- SharedWorkerGlobalScope
- SharedWorkerGlobalScope: close() method
- SharedWorkerGlobalScope: connect event
- SharedWorkerGlobalScope: name property
Browser support (view on caniuse.com)
- Chrome 5 Released on 2010-05-25
- Chrome Android ❌ See crbug.com/40290702 crbug.com/40554522
- Edge 79 Released on 2020-01-15
- Firefox 29 Released on 2014-04-29
- Firefox for Android 33 Released on 2014-10-14
- Safari 16 Released on 2022-09-12
- Safari on iOS 16 Released on 2022-09-12
Baseline availability blocked since September 2022 by Chrome Android (31 months)
Specifications
- HTML (#shared-workers-introduction), from HTML Workstream (WHATWG).
View web-platform-tests results for this feature - View the feature source file (dist) - Edit the feature - Report an issue about this feature