UNPKG

@cheprasov/worker-thread

Version:

The WorkerThread wraps a Web Worker with a Promise, also the class creates a worker script on the fly (without having to create separate worker files). You can 'inline' your worker function in the same js file as main logic.

10 lines (9 loc) 167 B
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Examples</title> <script src="./dist.js"></script> </head> <body></body> </html>