How to return multiple element's value from Chrome Plugin, tabs.executeScript.
Please suggest in below code.
chrome.tabs.executeScript(
targetTab.id,
{
code: "var header = {'top':document.getElementsByClassName('top-card')[0].innerHTML;}"
},
function (sourceCode)
{
myCode = sourceCode;
chrome.tabs.create({'url': chrome.extension.getURL('popup.html')});
}
);
Like here I m getting value of class 'top-card' I also want value of, say, 'footer', 'content' much more many class.