Is it possible to determine a tab's opener within a Google Chrome extension?

后端 未结 4 1961
遥遥无期
遥遥无期 2020-12-31 17:37

I am looking for a way to determine a given tab\'s opener (parent tab) within a Google Chrome extension.

I\'ve looked at the documention for Tab but there doesn\'t r

4条回答
  •  伪装坚强ぢ
    2020-12-31 18:28

    Further investigation has revealed that onCreatedNavigationTarget() does not always fire when you think it would to indicate an opener-opened relationship.

    An additional hint can sometimes be found in the Tab object returned by chrome.tabs.onCreated/onUpdated in the .openerTabId parameter.

    A comprehensive solution will probably have to rely on multiple of the methods described in these answers.

提交回复
热议问题