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