I am using VS community 2015 for a sample project and the code doesn't seem to work. I want to use the chrome history and display it in my browser window. This does not work for some reasons. The code I am using is pretty simple. But still it doesn't work.
<!DOCTYPE html><html><head><title>Search header</title><script type="text/javascript">
window.onload = function() {
chrome.history.search({ text: '', maxResults: 10 }, function (data) {
data.forEach(function (page) {
document.getElementById("pageurl").innerHTML(page.url);
document.getElementById("pagedesc").innerHTML(page.description);
});
});
};</script><meta charset="utf-8" /></head><body><div id="pageurl"></div><div id="pagedesc"></div></body></html>
Please check the code and explain the fault and also please help me with the chrome.history.search extension. Regards, Deepak