Proxytown
Run third-party scripts in web workers
Alternate implementation of Partytown with automatic cross-thread global variables support.
- Third-party scripts can use DOM API and main thread globals automatically
- Globals created in worker thread are usable in main thread automatically
- Scripts created by third-party scripts execute in worker automatically
- Lightweight - 6KB for all files combined
Usage
Get the Proxytown folder from proxytown-download.vercel.app, add the iframe to your page, and set type="text/proxytown" on third-party scripts.