Closed Yuu-Han closed 3 weeks ago
b0b11363129a07f2d9ea8ee62b40daed01c340d7
When a tab is activated, try to locate the page in hmPages
Issues:
chrome.tabs.onActivated
event might be fired earlier than chrome.webNavigation.onCommitted
event. In this case, when a new page is opened, both the newly added node and the virtual node are displayed.
Is it possible that an activated tab is not a node in history map?
Yes. The current behaviour is adding a virtual node.
- Otherwise, add a virtual node to the bottom of the hm tree
- How to save the node? Automatically add it to the array or let the user decide?
I haven't decided whether to directly add it to hmPages or add on user's demand.
Decision: add the page to hmPages
on activating the tab.
This helps to locate the current tab on historymap.