2
2
2byte2016-03-02 11:33:51
JavaScript
2byte, 2016-03-02 11:33:51

Chrome extension chrome.tabs missing from chrome object?

When executing the script via chrome.tabs.executeScript(). In the chrome object, the script being executed does not have a tabs object, the rights are set in other places, but not here.

chrome.tabs.executeScript(tab[0].id, {
    file: 'popupExecutor.js'
     }, function () {
     console.log('Run script');
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
B_bird, 2016-03-10
@B_bird

tabs undefined only in two cases, perhaps: either there are no rights in the manifest, or the call is not from the background page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question