josdejong/workerpool

Is there a way to check `origin`?

Open

#513 aperta il 2 set 2025

Vedi su GitHub
 (10 commenti) (0 reazioni) (0 assegnatari)JavaScript (164 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (2297 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Normally, you can do something like this in the web worker:

addEventListener("message", (event) =>
{
    if (event.origin != self.origin && event.origin != "") return;
    // ...
});

Guida contributor