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

fix: link to Window.postMessage rather than MessagePost.postMessage #37252

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

activescott
Copy link
Contributor

Description

The wrong postMessage method was referenced here. The frame.contentWindow returns a Window, which is a different postMessage and only the Window's postMessage implementation has the correct 3-argument signature as used in the example.

Motivation

More accurate documentation -confusing to follow that link and not see the actual overload used in the example.

The wrong postMessage method was referenced here. The frame.contentWindow returns a Window, which is a different postMessage and only the Window's postMessage implementation has the correct 3-argument signature as used in the example.
@activescott activescott requested a review from a team as a code owner December 18, 2024 01:59
@activescott activescott requested review from sideshowbarker and removed request for a team December 18, 2024 01:59
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Dec 18, 2024
Copy link
Contributor

github-actions bot commented Dec 18, 2024

Preview URLs

(comment last updated: 2024-12-18 03:43:55)

Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thank you @activescott !

@wbamberg wbamberg merged commit 5c5b3ab into mdn:main Dec 18, 2024
8 checks passed
allan-bonadio pushed a commit to allan-bonadio/content that referenced this pull request Dec 25, 2024
…dn#37252)

* fix: link to Window.postMessage rather than MessagePost.postMessage

The wrong postMessage method was referenced here. The frame.contentWindow returns a Window, which is a different postMessage and only the Window's postMessage implementation has the correct 3-argument signature as used in the example.

* Update files/en-us/web/api/messagechannel/port2/index.md

---------

Co-authored-by: wbamberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants