OLD | NEW |
1 // For test onRequest. | 1 // For test onRequest. |
2 chrome.extension.sendRequest({step: 1}, function(response) { | 2 chrome.extension.sendRequest({step: 1}, function(response) { |
3 if (response.nextStep) | 3 if (response.nextStep) |
4 chrome.extension.sendRequest({step: 2}); | 4 chrome.extension.sendRequest({step: 2}); |
5 }); | 5 }); |
6 | 6 |
7 // For test sendRequest. | 7 // For test sendRequest. |
8 chrome.extension.onRequest.addListener(function(request, sendResponse) { | 8 chrome.extension.onRequest.addListener(function(request, sender, sendResponse) { |
9 sendResponse({success: (request.step2 == 1)}); | 9 sendResponse({success: (request.step2 == 1)}); |
10 }); | 10 }); |
OLD | NEW |