Closed kaidatavis closed 6 months ago
It seems that the 'openerTabId' is buggy.
One option is to use the chrome history API's getVisits
methods returns a VisitItem
that includes a transition
(TransitionType). The value would be 'typed' if the URL is entered manually.
The other option is to use the chrome webNavigation API. This seems a more comprehensive option as it also reports page redirection (client or server) and the loading of the subframes within a page.
It seems that onCommitted
is the event to watch for page update.
I also tried onHistoryStateUpdate
. I thought it would be triggered every time an entry is added to the chrome history, but the actual behaviour is a bit different.
The implementation now uses the history API to check how the url is updated, e.g., by clicking a linking or manually typed in. tabOpenerId
is only used when a linked is opened in a new tab.
The desired behaviour is to create a new tree in this case.