0.1.3 • Published 2 years ago

townroad v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Townroad 🎉

Run third-party scripts with automatic cross-thread global variables support.

Features

  • Run third party scripts in worker thread 🥳
  • Thirdy party scripts can still use DOM API and global variables defined in main thread automatically.
  • Any globals created in worker thread is also be usable in main thread automatically.
  • Scripts created and inserted by thirdy party scripts gets executed in worker thread automatically.
  • Lightweight (6KB for all files combined)

Setup

Get the Townroad folder from here

(specify either specific version or go for the latest)

Move this folder in your project, and use the townroad iframe in your page

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

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

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

Not Production Ready !

It's still in development 🛠

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago