Code styling

pull/2/head
Deathamns 10 years ago committed by gorhill
parent 847f86f947
commit 14950c0c5f

@ -295,7 +295,7 @@ vAPI.messaging.onPortMessage = function(request, port) {
} }
port.postMessage({ port.postMessage({
requestId: request.requestId, requestId: request.requestId,
portName: request.portName, channelName: request.channelName,
msg: response !== undefined ? response : null msg: response !== undefined ? response : null
}); });
}; };
@ -303,7 +303,7 @@ vAPI.messaging.onPortMessage = function(request, port) {
// Specific handler // Specific handler
var r = vAPI.messaging.UNHANDLED; var r = vAPI.messaging.UNHANDLED;
var listener = vAPI.messaging.listeners[request.portName]; var listener = vAPI.messaging.listeners[request.channelName];
if ( typeof listener === 'function' ) { if ( typeof listener === 'function' ) {
r = listener(request.msg, port.sender, callback); r = listener(request.msg, port.sender, callback);
} }
@ -383,7 +383,7 @@ vAPI.net = {
'onHeadersReceived' 'onHeadersReceived'
]; ];
for (var i = 0; i < listeners.length; ++i) { for ( var i = 0; i < listeners.length; i++ ) {
chrome.webRequest[listeners[i]].addListener( chrome.webRequest[listeners[i]].addListener(
this[listeners[i]].callback, this[listeners[i]].callback,
{ {

Loading…
Cancel
Save