Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BroadcastChannel: onmessage must be null #41963

Closed
bnoordhuis opened this issue Feb 14, 2022 · 1 comment · Fixed by #41970
Closed

BroadcastChannel: onmessage must be null #41963

bnoordhuis opened this issue Feb 14, 2022 · 1 comment · Fixed by #41970
Labels
worker Issues and PRs related to Worker support.

Comments

@bnoordhuis
Copy link
Member

Version

No response

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

const { BroadcastChannel } = require('worker_threads')
const c = new BroadcastChannel("x")
if (c.onmessage !== null) throw "fail" // it's undefined

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

No response

What do you see instead?

Additional information

Rabbit hole: browsers and deno agree .onmessage and .onmessageerror are getters+setters inherited from EventTarget.

@VoltrexKeyva VoltrexKeyva added the worker Issues and PRs related to Worker support. label Feb 14, 2022
@benjamingr
Copy link
Member

benjamingr commented Feb 14, 2022

This is a problem with how we do event handlers - it needs to always return null. I'll open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worker Issues and PRs related to Worker support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants