mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Convert beforeunload listeners
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
initialize: function() {
|
||||
this.listenTo(this.model, 'change', this.render); // auto update
|
||||
this.listenTo(this.model, 'destroy', this.remove); // auto update
|
||||
window.addEventListener('beforeunload', function () {
|
||||
extension.windows.beforeUnload(function() {
|
||||
this.stopListening();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
new SocketView().render().$el.appendTo(this.$('.socket-status'));
|
||||
|
||||
window.addEventListener('beforeunload', function () {
|
||||
extension.windows.beforeUnload(function() {
|
||||
this.inbox.stopListening();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user