this is my content script:


chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse)
{

var con =JSON.stringify(request);
log("Content script loaded: " + con);


});

from background.js i have a for loop so i am getting 10 times dynamic request in content script. but the last request always replace the previous request data and only sotred the last one in content script. is there any way i can store request in content script in an array is time new request will come ?

any sample code ?