
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
web-worker-components
Advanced tools
Custom elements for running Web Workers.
See Developer.md for implementation decisions and details.
See Roadmap.md for upcoming features.
The demo directory contains demo pages for various example usages. Run npm run demo to launch the demo site at localhost:5000.
But before the demo site is usable, the project distribution files have to be built first.
Download the release bundle or build it from the source, then include the needed files in your project.
parent.html
<script src="web-worker-components.js"></script>
<web-worker id="worker" src="worker.js"></web-worker>
<script>
worker.onmessage = (e) => {
console.log("Message received from worker", e.data);
};
worker.postMessage("Hello World!");
</script>
worker.js
onmessage = function(e) {
console.log('Message received from main script', e.data);
postMessage(e.data);
}
Run npm install && npm run build to build the distribution files to dist directory.
This library requires browser support for Custom Elements.
It also requires native-shim available here to allow use of Custom Elements in transpiled ES5 code.
The polyfills are already bundled in web-worker-components.js. Use web-worker-components-lite.js if the polyfills are provided separately.
This project follows Semantic Versioning. See History.md for release changes.
FAQs
Custom elements for running Web Workers.
We found that web-worker-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.