josdejong/workerpool

Is there a way to check `origin`?

Open

#513 opened on Sep 2, 2025

View on GitHub
 (10 comments) (0 reactions) (0 assignees)JavaScript (164 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (2,297 stars)
PR merge metrics
 (PR metrics pending)

Description

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

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

Contributor guide