There's currently no reliable way to detect when a MessagePort becomes disentangled, whether due to purposefully calling .close(), or the tab being unexpectedly killed.
An onclose event was proposed and discussed several years ago, but it looks like the discussion petered out after that.
Any hope of reviving it?
There's currently no reliable way to detect when a MessagePort becomes disentangled, whether due to purposefully calling .close(), or the tab being unexpectedly killed.
An onclose event was proposed and discussed several years ago, but it looks like the discussion petered out after that.
Any hope of reviving it?