MessagePort Examples are for the Window.postMessage() API #37149
Labels
Content:WebAPI
Web API docs
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/postMessage
What specific section or headline is this issue about?
Example
What information was incorrect, unhelpful, or incomplete?
The examples seem to be for the Window.postMessage() method, rather than the similarly named MessagePort.postMessage() method.
What did you expect to see?
Examples that use the arguments you can give to MessagePort.postMessage(), i.e. without the targetOrigin
"*"
.It would be nice to have some examples of how to use
transfer
properly too, as it seems quite finicky. I think you need to both put it in the message, and put it in the transfer array.Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/api/messageport/postmessage
The text was updated successfully, but these errors were encountered: