'How to know if the replaced tab for a previously discarded tab is the same?
So you discarded a tab and later when you click on the discarded tab , it reloads the page.
First:
OnUpdated()
gets called withchangeInfo.discarded === true
and on reload:
onUpdated()
gets called withchangeInfo.discarded === false
.onUpdated()
gets called withchangeInfo.status === complete
.
How, would I know that the tab
in Step 2
is the replacement for the discarded tab. The tab.id
has changed by now and the tab.discarded
property of the newtab
has also been reset. So, ducktyping?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|