Convert code from manifest v2 to v3 chrome extension

22 views Asked by At

How to pass variable from background.js to content script?

            chrome.tabs.executeScript(tabId, {
                code: 'var MODULE = "'+MODULE+'";'
            }, function () {
                chrome.tabs.executeScript(tabId, {file: 'events.js'});
            });

I want to correct answer.

0

There are 0 answers