1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-01 08:39:37 +02:00

code review: this is needed to keep closure alive

This commit is contained in:
gorhill 2016-03-06 21:27:28 -05:00
parent 040a3ea5ef
commit 7884cf70f6

View File

@ -50,6 +50,7 @@
let shutdown = function(ev) { let shutdown = function(ev) {
if ( ev.target === this ) { if ( ev.target === this ) {
this.removeEventListener('unload', shutdown); this.removeEventListener('unload', shutdown);
locationChangeListener = null;
} }
}; };
this.addEventListener('unload', shutdown); this.addEventListener('unload', shutdown);