Chrome extension: create tab then inject content script into it
问题 Upon receiving a message from a content script I want to create a new tab and fill the page it opens dynamically (for now I'm just trying to turn the newly created page red). eventPage.js: // ... code that injects another content script, works fine // Problem code... chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { chrome.tabs.create({url: chrome.extension.getURL("blankpage.html")}, turnTabRed); }); function turnTabRed(tab) { chrome.tabs.executeScript( tab.id,