Firefox: behind-the-scene requests / non-http tabs

pull/2/head
Deathamns 10 years ago committed by gorhill
parent 995236c6a9
commit f196d31a2f

@ -143,12 +143,9 @@ vAPI.messaging = {
}; };
return this.channels[channelName]; return this.channels[channelName];
} },
};
/******************************************************************************/
var toggleListener = function({type, persisted}) { toggleListener: function({type, persisted}) {
if ( !vAPI.messaging.connector ) { if ( !vAPI.messaging.connector ) {
return; return;
} }
@ -161,10 +158,11 @@ var toggleListener = function({type, persisted}) {
if ( persisted ) { if ( persisted ) {
addMessageListener(vAPI.messaging.connector); addMessageListener(vAPI.messaging.connector);
} }
}
}; };
window.addEventListener('pagehide', toggleListener, true); window.addEventListener('pagehide', vAPI.messaging.toggleListener, true);
window.addEventListener('pageshow', toggleListener, true); window.addEventListener('pageshow', vAPI.messaging.toggleListener, true);
/******************************************************************************/ /******************************************************************************/

Loading…
Cancel
Save