+ cleanBeforeDestroy: function() {
+ window.removeEventListener("beforeunload", this.cleanBeforeDestroy);
+ this.conn.removeEventListener("message", this.socketMessageListener);
+ this.conn.removeEventListener("close", this.socketCloseListener);
+ this.conn.send(JSON.stringify({code: "disconnect"}));
+ this.conn = null;
+ },