mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-14 11:34:02 +00:00
await worker is ready
This commit is contained in:
@@ -9,6 +9,12 @@ import prove from "./prove";
|
||||
import { PoWConfig, ServiceWorkerMessage, ServiceWorkerWork } from "./types";
|
||||
|
||||
log.log("worker registered");
|
||||
|
||||
const ready: ServiceWorkerMessage = {
|
||||
type: "ready",
|
||||
};
|
||||
postMessage(ready);
|
||||
|
||||
onmessage = async (e) => {
|
||||
console.debug("message received at worker");
|
||||
const config: PoWConfig = e.data;
|
||||
|
||||
Reference in New Issue
Block a user