I have a web extension. Everything works well but I use an angular 6 application for the popup browser action, it opens in an iframe in the web page, the problem comes when browser.tabs
don't work in the main app.
If I do the same thing in a simple html & js app and "default_popup": "index.html"
in that case browser.tabs
works. Just like tabs tabs tabs example of web extensions.
I just want the tab information in the angular app. I get that in background script and content script etc..
What I have tried is here : Migrating chrome extension to web extension
I got it to work through browser cookies but if you use the app in multiple windows the cookies change so the results are wrong.
In chrome extensions this works in angular popup application
chrome.tabs.query({
active: true,
currentWindow: true
}, function (tabs) {});
But same in firefox doesn't it says browser.tabs
is undefined
browser.tabs.query({
active: true,
currentWindow: true
}, function (tabs) {});
It only works in background script
.