Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 ðŸ›