I want to get the URL, title for that url and timeStamp for whatever is being navigated by the browser.
Using webNavigation.onCommitted, I can get the URL and timeStamp, but not the title (ie if url was stackoverflow.com, the title is Stackoverflow - Where developers learn, share and build careers).
const checkWebNav = (details) => {
// Can only see url and timeStamp, no title fields
console.log(details.url, details.timeStamp);
};
browser.webNavigation.onCommitted.addListener(
checkWebNav,
{url: [{schemes: ["http", "https"]}]}
)
However, there is no title property. I know that tabs API can get the title, url and last accessed, but that gets rather messy. Like I get the title, url for each tab onCreated, what if the user uses said tab for navigation, would I need to track whether that tab has changed url to log it?
Can this be done on a web request/navigation level? WebRequests aren't ideal either, since the main_frame filtering doesn't show internal routing changes to the navigation.
This is for Firefox Add-on Android as well, so I cannot just use the History API.