I am trying to listen to updates to a tab's URL in a chrome extension. The documentation for chrome.tabs.onUpdated.addListener explains that updates to attributes like url will trigger the listener, but I am only seeing updates for the loading status or an empty changeInfo object.
background.js
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab)=>{
console.log("change info", changeInfo);
});
What I see in the console when I navigate to new URLs, either via the search bar or clicking on links:
change info {status: 'loading'}
change info {}
change info {}
change info {status: 'complete'}
How could a listener be triggered on an empty changeInfo object? and why do none of the updates include url changes? What am I doing wrong here? (this is not limited to chrome, reproduced in safari as well).