Use MessagePort `close` event if available
Use MessagePort's built-in `close` event to detect when the sending frame goes away, instead of the sending window's `unload` event, which is being deprecated. Currently only beta/dev versions of Chrome support the MessagePort `close` event. Fixes https://github.com/hypothesis/client/issues/5621
Showing
Please register or sign in to comment