fix beforeunload warning if peer on transfer
This commit is contained in:
parent
115c0785e5
commit
16f5711c98
2 changed files with 0 additions and 2 deletions
|
@ -7,7 +7,6 @@ class ServerConnection {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this._connect();
|
this._connect();
|
||||||
Events.on('beforeunload', _ => this._disconnect());
|
|
||||||
Events.on('pagehide', _ => this._disconnect());
|
Events.on('pagehide', _ => this._disconnect());
|
||||||
document.addEventListener('visibilitychange', _ => this._onVisibilityChange());
|
document.addEventListener('visibilitychange', _ => this._onVisibilityChange());
|
||||||
if (navigator.connection) navigator.connection.addEventListener('change', _ => this._reconnect());
|
if (navigator.connection) navigator.connection.addEventListener('change', _ => this._reconnect());
|
||||||
|
|
|
@ -5,7 +5,6 @@ class ServerConnection {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this._connect();
|
this._connect();
|
||||||
Events.on('beforeunload', _ => this._disconnect());
|
|
||||||
Events.on('pagehide', _ => this._disconnect());
|
Events.on('pagehide', _ => this._disconnect());
|
||||||
document.addEventListener('visibilitychange', _ => this._onVisibilityChange());
|
document.addEventListener('visibilitychange', _ => this._onVisibilityChange());
|
||||||
if (navigator.connection) navigator.connection.addEventListener('change', _ => this._reconnect());
|
if (navigator.connection) navigator.connection.addEventListener('change', _ => this._reconnect());
|
||||||
|
|
Loading…
Reference in a new issue