function onVisited(historyItem) {
console.log(historyItem.url);
console.log(new Date(historyItem.lastVisitTime));
}
browser.history.onVisited.addListener(onVisited);history.onVisited / notebook
history.onVisited
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.