How to trigger an event only when the user changes the URL?
问题 I am working on a Chrome extension, I want to detect when the user has typed a URL. I know about: chrome.tabs.onUpdated.addListener(eventLisenerObj.onUpdated); But, it gets called whenever the URL is changed (e.g. when the page is auto reloads, or user clicks on a link, etc.) I desire to be able to determine that the URL was changed only by the user typing a URL. 回答1: You can get this information using the webNavigation.onCommitted (MDN) event. The event listener receives a property