Uncaught (in promise) TypeError: undefined has no properties
moz-extension://3515db55-fef7-443b-baaa-0fef84f7ac7c/js/background.js:166and changing browser.tabs to chrome.tabs fails constantly witand changing browser.tabs to chrome.tabs fails constantly with
Yes but the strange thing is that it worked in the example I have posted last week and it doesn’t now…
In fact, no, it does not work with MV2 in this example neither (I only saw that the content script was loaded) but using the past menu gives the same error.
With MV3 in the manifest, I have to give the permission for the page, but the call succeed.
I would guess that tab is undefined .
Put more console logs statements there to be sure.
If you execute this code in a console window that has no tabs, it will fail.
Regarding the browser/chrome, in the MV3 they should behave the same as long as you don’t provide callback parameter.