Skip to content

onmessage is not called when importing module #37

Description

@5d-jh

If import module from deno side code, self.onmessage is not getting called.

// node-side.ts
const worker = new Worker(new URL('deno-side.ts'), { allowAll: true });
worker.postMessage({ message: 'hi' })
// deno-side.ts
self.onmessage = (e) => {
  // this is getting invoked, but
}
// deno-side.ts
import { something } from './something.ts'; 

self.onmessage = (e) => {
  // this is NOT getting invoked
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions