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

MessagePort Examples are for the Window.postMessage() API #37149

Open
majaha opened this issue Dec 9, 2024 · 0 comments
Open

MessagePort Examples are for the Window.postMessage() API #37149

majaha opened this issue Dec 9, 2024 · 0 comments
Labels
Content:WebAPI Web API docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@majaha
Copy link
Contributor

majaha commented Dec 9, 2024

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
@majaha majaha added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Dec 9, 2024
@github-actions github-actions bot added the Content:WebAPI Web API docs label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

1 participant