Open
Bug 1883187
Opened 1 year ago
Updated 5 months ago
`message` event handler triggered after `MessagePort.close()`
Categories
(Core :: DOM: postMessage, defect, P3)
Tracking
()
ASSIGNED
People
(Reporter: daxpedda, Assigned: asuth)
Details
(Whiteboard: dom-lws-bugdash-triage)
Description
I'm actually unsure if this is a bug or not, but the behavior between Chrome and Firefox differs here. Chrome does not trigger the message event handler after the MessagePort is closed, but Firefox does. In my attempt to understand the spec I couldn't find a clear answer.
Steps to reproduce
const channel = new MessageChannel
channel.port1.onmessage = () => console.log('message received')
channel.port2.postMessage(undefined)
channel.port1.close()
console.log('after `close`')
Actual results
after `close`
message received
Expected results
after `close`
Component: General → DOM: postMessage
Product: Firefox → Core
Version: unspecified → Firefox 123
| Assignee | ||
Updated•1 year ago
|
Assignee: nobody → bugmail
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Updated•1 year ago
|
Severity: -- → S3
Priority: -- → P3
| Assignee | ||
Updated•5 months ago
|
Whiteboard: dom-lws-bugdash-triage
You need to log in
before you can comment on or make changes to this bug.
Description
•