Stops the platform and disconnects this client from the host when the browser unloads the document.
By default, the platform initiates shutdown when the browser unloads the document, i.e., when beforeunload is triggered.
The main reason for beforeunload instead of unload is to avoid posting messages to disposed windows.
However, if beforeunload is not triggered, e.g., when an iframe is removed, we fall back to unload.
Stops the platform and disconnects this client from the host when the browser unloads the document.
By default, the platform initiates shutdown when the browser unloads the document, i.e., when
beforeunload
is triggered. The main reason forbeforeunload
instead ofunload
is to avoid posting messages to disposed windows. However, ifbeforeunload
is not triggered, e.g., when an iframe is removed, we fall back tounload
.