-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add messaging APIs and their infra #1913
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ddbeck
requested changes
Oct 8, 2024
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
ddbeck
requested changes
Oct 9, 2024
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
ddbeck
requested changes
Oct 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close now. Two small fixes to make and refreshing the dist, then we can land this. Thank you!
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
ddbeck
approved these changes
Oct 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Everything in this area is grouped in the
Communications
section of the HTML spec. I added a group calledMessaging
instead of going the spec route, since it aligns more with how developers refer to these features.I joined
MessageChannel
andMessagePort
intoChannel Messaging
, aligning with how the spec, MDN and Caniuse do it.MessageEvent
is implemented in numerous places, but doesn't seem like a standalone feature... butmessageerror
was already done, so I followed that precedent here, adding the various implementation keys as well.A couple of notes on
postMessage
:Cross-document messaging
- which is how the spec describes it too. I dug around and few references by developers toCross-document messaging
, but a zillion topostMessage
, so I'm erring on the side of usage-in-the-wild. Sometimes tutorials just called itWeb Messaging
also, but they pre-dated all the newer messaging stuff.This whole feature group has this same challenge: Do you put the key in the implementation (eg, putting
postMessage
in each ofWindow
,ServiceWorker
, etc) or put the implementation keys in the feature. Might be worth a deeper discussion with the group. I'll bring this up at the meeting this week.Features previously done in this area:
BroadcastChannel
messageerror
Features added here:
Channel Messaging
- includesMessageChannel
andMessagePort
postMessage
EventSource
MessageEvent
Group added here:
Messaging