I am creating a Google Chrome extension that collects details of the page loaded in active tab. I am getting the page title and URL correctly, but the page HTML source is not loading. This is the code I am using to get title and URL:
chrome.tabs.getSelected(null, function(tab) {
u = tab.url;
t = tab.title;
document.write("Title: "+t+"<br>URL: "+u);
});
How can I get the HTML source of the tab page?