“Cannot read property of undefined” when using chrome.tabs or other chrome API in content script

As content script has its own limitations,

chrome.tabs is only available in background scripts and popup scripts.

If you wanna to use chrome.tabs then pass message from content_script to background script and play with chrome.tabs.

Leave a Comment