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

Add messaging APIs and their infra #1913

Merged
merged 24 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dfbcfd5
remove drafts
autonome Oct 7, 2024
ff625b3
remove draft keys, add postmessage
autonome Oct 7, 2024
de47f5b
Merge branch 'main' into messaging
autonome Oct 7, 2024
29fddca
Merge branch 'main' into messaging
autonome Oct 8, 2024
6ec0142
move keys into the feature vs specific impl
autonome Oct 8, 2024
9bc2988
fixup for broadcastchannel for now
autonome Oct 8, 2024
e7a2dd6
desc updates, more key fixes
autonome Oct 8, 2024
4ea8e93
Merge branch 'main' into messaging
autonome Oct 8, 2024
c6f9d53
Merge branch 'main' into messaging
autonome Oct 8, 2024
d26c507
Update features/channel-messaging.yml
autonome Oct 9, 2024
3f68bc4
Merge branch 'messaging' of https://github.com/autonome/web-features …
autonome Oct 9, 2024
a84c936
rename eventsource file
autonome Oct 9, 2024
c09b24c
remove drafty stuff
autonome Oct 9, 2024
d31cf7f
move MessageEvent.ports over to Channel Messaging
autonome Oct 9, 2024
35998d2
Update features/postmessage.yml
autonome Oct 10, 2024
e25cbd4
Update features/postmessage.yml
autonome Oct 10, 2024
b775eff
Update features/server-sent-events.yml
autonome Oct 10, 2024
d5d643b
merge
autonome Oct 10, 2024
b4a7b1a
Update features/postmessage.yml
autonome Oct 10, 2024
c3443fc
review fixes
autonome Oct 10, 2024
b8c37d4
Merge branch 'messaging' of https://github.com/autonome/web-features …
autonome Oct 10, 2024
386777a
review fixes
autonome Oct 10, 2024
2e9b8f9
Update features/channel-messaging.yml
autonome Oct 10, 2024
f8b3c62
Refresh dist
ddbeck Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions features/broadcast-channel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ name: BroadcastChannel
description: The `BroadcastChannel` API allows you to send messages between same-origin browsing contexts, such as between the same page loaded in multiple tabs.
spec: https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts
caniuse: broadcastchannel
group: messaging
status:
compute_from: api.BroadcastChannel.BroadcastChannel
18 changes: 18 additions & 0 deletions features/channel-messaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Channel messaging
description: "Channel messaging communicates one-to-one between browsing contexts on the same origin, such as between `<iframe>` elements or two documents using a shared worker."
spec: https://html.spec.whatwg.org/multipage/web-messaging.html#channel-messaging
caniuse: channel-messaging
group: messaging
status:
compute_from: api.MessageChannel
compat_features:
- api.MessageChannel
- api.MessageChannel.MessageChannel
- api.MessageChannel.port1
- api.MessageChannel.port2
- api.MessageEvent.ports
- api.MessagePort
- api.MessagePort.close
- api.MessagePort.message_event
- api.MessagePort.postMessage
- api.MessagePort.start
49 changes: 49 additions & 0 deletions features/channel-messaging.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Generated from: channel-messaging.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2015-09-22
baseline_high_date: 2018-03-22
support:
chrome: "2"
chrome_android: "18"
edge: "12"
firefox: "41"
firefox_android: "41"
safari: "5"
safari_ios: "4.2"
compat_features:
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "4"
# chrome_android: "18"
# edge: "12"
# firefox: "3"
# firefox_android: "4"
# safari: "4"
# safari_ios: "3.2"
- api.MessageEvent.ports

# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2015-09-22
# baseline_high_date: 2018-03-22
# support:
# chrome: "2"
# chrome_android: "18"
# edge: "12"
# firefox: "41"
# firefox_android: "41"
# safari: "5"
# safari_ios: "4.2"
- api.MessageChannel
- api.MessageChannel.MessageChannel
- api.MessageChannel.port1
- api.MessageChannel.port2
- api.MessagePort
- api.MessagePort.close
- api.MessagePort.message_event
- api.MessagePort.start
31 changes: 0 additions & 31 deletions features/draft/spec/html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ compat_features:
- api.DataTransferItemList.remove
- api.DedicatedWorkerGlobalScope
- api.DedicatedWorkerGlobalScope.close
- api.DedicatedWorkerGlobalScope.message_event
- api.DedicatedWorkerGlobalScope.name
- api.DedicatedWorkerGlobalScope.postMessage
- api.Document
- api.Document.DOMContentLoaded_event
- api.Document.activeElement
Expand Down Expand Up @@ -98,15 +96,6 @@ compat_features:
- api.ErrorEvent.filename
- api.ErrorEvent.lineno
- api.ErrorEvent.message
- api.EventSource
- api.EventSource.EventSource
- api.EventSource.close
- api.EventSource.error_event
- api.EventSource.message_event
- api.EventSource.open_event
- api.EventSource.readyState
- api.EventSource.url
- api.EventSource.withCredentials
- api.FileList
- api.FormDataEvent
- api.FormDataEvent.FormDataEvent
Expand Down Expand Up @@ -244,22 +233,6 @@ compat_features:
- api.MediaError
- api.MediaError.code
- api.MediaError.message
- api.MessageChannel
- api.MessageChannel.MessageChannel
- api.MessageChannel.port1
- api.MessageChannel.port2
- api.MessageEvent
- api.MessageEvent.MessageEvent
- api.MessageEvent.data
- api.MessageEvent.lastEventId
- api.MessageEvent.origin
- api.MessageEvent.ports
- api.MessageEvent.source
- api.MessagePort
- api.MessagePort.close
- api.MessagePort.message_event
- api.MessagePort.postMessage
- api.MessagePort.start
- api.NavigateEvent.canIntercept
- api.NavigateEvent.hasUAVisualTransition
- api.NavigateEvent.intercept
Expand Down Expand Up @@ -442,7 +415,6 @@ compat_features:
- api.Window.length
- api.Window.load_event
- api.Window.localStorage
- api.Window.message_event
- api.Window.name
- api.Window.navigator
- api.Window.offline_event
Expand All @@ -456,7 +428,6 @@ compat_features:
- api.Window.pageswap_event
- api.Window.parent
- api.Window.popstate_event
- api.Window.postMessage
- api.Window.prompt
- api.Window.rejectionhandled_event
- api.Window.self
Expand All @@ -469,9 +440,7 @@ compat_features:
- api.Worker
- api.Worker.Worker
- api.Worker.error_event
- api.Worker.message_event
- api.Worker.messageerror_event
- api.Worker.postMessage
- api.Worker.terminate
- api.WorkerGlobalScope
- api.WorkerGlobalScope.error_event
Expand Down
127 changes: 0 additions & 127 deletions features/draft/spec/html.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,6 @@ compat_features:
- api.Document.activeElement
- api.Document.hasFocus
- api.FileList
- api.MessageEvent
- api.MessageEvent.data
- api.MessageEvent.origin
- api.MessageEvent.source
- api.Window.postMessage

# baseline: high
# baseline_low_date: 2015-07-29
Expand All @@ -608,7 +603,6 @@ compat_features:
# safari: "4"
# safari_ios: "5"
- api.Worker
- api.Worker.postMessage
- api.Worker.terminate

# baseline: high
Expand Down Expand Up @@ -831,19 +825,6 @@ compat_features:
# safari_ios: "4.2"
- html.global_attributes.draggable

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "4"
# chrome_android: "18"
# edge: "12"
# firefox: "3"
# firefox_android: "4"
# safari: "4"
# safari_ios: "3.2"
- api.MessageEvent.ports

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
Expand All @@ -870,11 +851,8 @@ compat_features:
# safari_ios: "5"
- api.DedicatedWorkerGlobalScope
- api.DedicatedWorkerGlobalScope.close
- api.DedicatedWorkerGlobalScope.message_event
- api.DedicatedWorkerGlobalScope.postMessage
- api.Worker.Worker
- api.Worker.error_event
- api.Worker.message_event
- api.WorkerGlobalScope
- api.WorkerGlobalScope.error_event
- api.WorkerGlobalScope.location
Expand Down Expand Up @@ -1455,27 +1433,6 @@ compat_features:
# safari_ios: "8"
- api.HTMLImageElement.srcset

# baseline: high
# baseline_low_date: 2015-09-22
# baseline_high_date: 2018-03-22
# support:
# chrome: "2"
# chrome_android: "18"
# edge: "12"
# firefox: "41"
# firefox_android: "41"
# safari: "5"
# safari_ios: "4.2"
- api.MessageChannel
- api.MessageChannel.MessageChannel
- api.MessageChannel.port1
- api.MessageChannel.port2
- api.MessagePort
- api.MessagePort.close
- api.MessagePort.message_event
- api.MessagePort.postMessage
- api.MessagePort.start

# baseline: high
# baseline_low_date: 2015-11-12
# baseline_high_date: 2018-05-12
Expand Down Expand Up @@ -1587,19 +1544,6 @@ compat_features:
# safari_ios: "6"
- api.PopStateEvent.PopStateEvent

# baseline: high
# baseline_low_date: 2016-08-02
# baseline_high_date: 2019-02-02
# support:
# chrome: "16"
# chrome_android: "18"
# edge: "14"
# firefox: "26"
# firefox_android: "26"
# safari: "6"
# safari_ios: "6"
- api.MessageEvent.MessageEvent

# baseline: high
# baseline_low_date: 2016-08-02
# baseline_high_date: 2019-02-02
Expand Down Expand Up @@ -1839,19 +1783,6 @@ compat_features:
- html.elements.meta.http-equiv.content-security-policy
- html.elements.meta.http-equiv.content-type

# baseline: high
# baseline_low_date: 2017-08-01
# baseline_high_date: 2020-02-01
# support:
# chrome: "60"
# chrome_android: "60"
# edge: "12"
# firefox: "9"
# firefox_android: "9"
# safari: "4"
# safari_ios: "4"
- api.Window.message_event

# baseline: high
# baseline_low_date: 2017-10-17
# baseline_high_date: 2020-04-17
Expand Down Expand Up @@ -1975,19 +1906,6 @@ compat_features:
- api.SVGElement.blur
- api.SVGElement.focus

# baseline: high
# baseline_low_date: 2018-04-30
# baseline_high_date: 2020-10-30
# support:
# chrome: "2"
# chrome_android: "18"
# edge: "17"
# firefox: "3"
# firefox_android: "4"
# safari: "4"
# safari_ios: "3.2"
- api.MessageEvent.lastEventId

# baseline: high
# baseline_low_date: 2018-04-30
# baseline_high_date: 2020-10-30
Expand Down Expand Up @@ -2259,25 +2177,6 @@ compat_features:
- html.elements.iframe.sandbox.allow-same-origin
- html.elements.iframe.sandbox.allow-scripts

# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
# support:
# chrome: "6"
# chrome_android: "18"
# edge: "79"
# firefox: "6"
# firefox_android: "45"
# safari: "5"
# safari_ios: "5"
- api.EventSource
- api.EventSource.EventSource
- api.EventSource.close
- api.EventSource.error_event
- api.EventSource.message_event
- api.EventSource.open_event
- api.EventSource.readyState

# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
Expand Down Expand Up @@ -2317,19 +2216,6 @@ compat_features:
# safari_ios: "6"
- api.PageTransitionEvent.PageTransitionEvent

# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
# support:
# chrome: "18"
# chrome_android: "18"
# edge: "79"
# firefox: "6"
# firefox_android: "45"
# safari: "6"
# safari_ios: "6"
- api.EventSource.url

# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
Expand All @@ -2343,19 +2229,6 @@ compat_features:
# safari_ios: "7"
- api.HTMLInputElement.setRangeText

# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
# support:
# chrome: "26"
# chrome_android: "26"
# edge: "79"
# firefox: "6"
# firefox_android: "45"
# safari: "7"
# safari_ios: "7"
- api.EventSource.withCredentials

# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
Expand Down
1 change: 1 addition & 0 deletions features/messageerror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ description: The `messageerror` event fires on a target, such as a window or wor
spec:
- https://html.spec.whatwg.org/multipage/indices.html#event-messageerror
- https://w3c.github.io/ServiceWorker/#eventdef-serviceworkerglobalscope-messageerror
group: messaging
27 changes: 27 additions & 0 deletions features/postmessage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: postMessage
description: "The `postMessage()` global method sends cross-origin messages to windows and workers, including popups and iframes. Also known as cross-document messaging."
spec: https://html.spec.whatwg.org/multipage/web-messaging.html#web-messaging
caniuse: x-doc-messaging
group: messaging
# Anchor baseline on window support.
status:
compute_from: api.Window.postMessage
compat_features:
# Other features, such as channel messaging and broadcast channels have
# `postMessage` methods too, but are not covered by this feature.
- api.DedicatedWorkerGlobalScope.postMessage
- api.Window.postMessage
- api.Worker.postMessage

# Already generated in Broadcast channel.
# Revisit once the "keys in impl or feature" question is answered.
#- api.BroadcastChannel.message_event
- api.DedicatedWorkerGlobalScope.message_event
- api.MessageEvent
- api.MessageEvent.MessageEvent
- api.MessageEvent.data
- api.MessageEvent.lastEventId
- api.MessageEvent.origin
- api.MessageEvent.source
- api.Window.message_event
- api.Worker.message_event
Loading
Loading