w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
318 stars 55 forks source link

Adding a close event to MessagePort API #923

Closed nononokam closed 5 months ago

nononokam commented 6 months ago

こんにちは TAG-さん!

I'm requesting a TAG review of a close event of MessagePort API.

This is a proposal to add a close event which notifies one of the MessagePorts that the other port has been disentangled (i.e., close() is called, an owning document is destroyed, or the port is garbage collected).

Further details:

You should also know that...

[please tell us anything you think is relevant to this review]

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

☂️ open a single issue in our GitHub repo for the entire review

💬 leave review feedback as a comment in this issue and @-notify @nononokam

hober commented 5 months ago

Hi @nononokam!

@torgo @LeaVerou @matatk and I looked at this today and we think this looks pretty good! I'm a little worried about this sort-of exposing GC timing sometimes, but you've already considered that and have ended up in a reasonable place.