chrome-extensions-samples icon indicating copy to clipboard operation
chrome-extensions-samples copied to clipboard

when doing console.log(chrome.tabs) is it supposed to return undefined

Open AhnafS opened this issue 2 years ago • 1 comments

every time i try to do chrome.tabs.query it always says that it cannot read undefined. I tried doing console.log(chrome.tabs) and found that it also gave undefined. Is this supposed to be the case?

AhnafS avatar Jul 16 '22 01:07 AhnafS

For future notice, can you please add some code in context?

If you're calling it without the proper parameters, or in the wrong location it could very much return undefined if no tab is open.

Thanks!

Ambushfall avatar Aug 20 '22 14:08 Ambushfall

Closing as @AhnafS did not share any code.

patrickkettner avatar Mar 20 '23 21:03 patrickkettner