appAPI.tabs.getActive 在 Firefox 中返回空对象
appAPI.ready(function()
{
// retrieves the information for the active tab
appAPI.tabs.getActive(function(tabInfo) {
console.log(
'tabId: ' + tabInfo.tabId +
' tabUrl: ' + tabInfo.tabUrl
);
});
});
我在我的扩展中尝试了上面的函数/代码 appAPI.tabs.getActive,它在 Chrome 中正常工作,但在 Firefox 中不工作,它给了我空对象 {}。如果有人知道问题是什么,请尽快回复,提前谢谢