8000 GitHub - MananTank/proxytown: alternate implementation of partytown with cross thread global support
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

alternate implementation of partytown with cross thread global support

Notifications You must be signed in to change notification settings

MananTank/proxytown

Repository files navigation

Proxytown 🎉

Alternate Implementation of 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

(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

<iframe hidden src="path/to/proxytown/proxytown.html"> </iframe>

Set type="text/proxytown" on third-party scripts that you wish to run in Proxytown's worker thread

<script type="text/proxytown" src="path/to/third-party-script"></script>

Checkout this sandbox for example


Not Production Ready!

It's still in development 🛠

About

alternate implementation of partytown with cross thread global support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0