Detect when tab was restored from history

94 Views Asked by At

How to detect when a tab was restored from history?

When a single tab is restored in onCreated event we can check pendingUrl property of the tab:

chrome.tabs.onCreated.addListener(tab =>
{
  console.log("restored", tab.pendingUrl && tab.pendingUrl === tab.url);
});

but in Edge v119.0.2151.58 this property not available when a window is restored and onCreated event fired for each tab in that window.

0

There are 0 best solutions below