Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manantank/proxytown
alternate implementation of partytown with cross thread global support
https://github.com/manantank/proxytown
Last synced: 1 day ago
JSON representation
alternate implementation of partytown with cross thread global support
- Host: GitHub
- URL: https://github.com/manantank/proxytown
- Owner: MananTank
- Created: 2022-04-06T05:43:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-20T02:04:57.000Z (about 2 years ago)
- Last Synced: 2024-11-12T19:14:39.307Z (8 days ago)
- Language: TypeScript
- Size: 503 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Proxytown 🎉
Alternate Implementation of [partytown](https://github.com/BuilderIO/partytown) library with automatic cross-thread global variables support
## Features
Run third-party scripts in the worker thread 🥳
- third party scripts can still use DOM API and global variables defined in the main thread automatically.
- Any globals created in the worker thread are also usable in the main thread automatically.
- scripts created and inserted by third-party scripts get executed in the worker thread automatically.
- Lightweight (6KB for all files combined)
## Setup
Get the Proxytown folder from [proxytown-download.pages.dev](https://proxytown-download.pages.dev/)
(specify either a specific version or go for the latest)
Move this folder in your project, and use the the Proxytown iframe in your page
```html
```Set `type="text/proxytown"` on third-party scripts that you wish to run in Proxytown's worker thread
```html
```
Checkout this [sandbox](https://codesandbox.io/s/7ebxo6?file=/index.html) for example
## Not Production Ready!
It's still in development ðŸ›