|
@ -21,8 +21,6 @@ |
|
|
|
|
|
|
|
|
// For non background pages
|
|
|
// For non background pages
|
|
|
|
|
|
|
|
|
/* global self */ |
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
/******************************************************************************/ |
|
|
|
|
|
|
|
|
(function(self) { |
|
|
(function(self) { |
|
@ -136,6 +134,9 @@ vAPI.messaging = { |
|
|
}, |
|
|
}, |
|
|
close: function() { |
|
|
close: function() { |
|
|
delete vAPI.messaging.channels[this.channelName]; |
|
|
delete vAPI.messaging.channels[this.channelName]; |
|
|
|
|
|
if ( Object.keys(vAPI.messaging.channels).length === 0 ) { |
|
|
|
|
|
vAPI.messaging.close(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|