chrome.runtime.sendMessage throws exception from content script after reloading Chrome Extension
问题 I send messages from the injected content scripts back to my background script in my Chrome Extension as such: chrome.runtime.sendMessage({action: "myResult"}); This works fine, until I reload my extension (by going to Settings -> Extensions -> "Reload (Ctrl+R)" for my extension.) In turn when my background script starts up it repeatedly calls chrome.tabs.executeScript for all open tabs to programmatically re-inject my content script (as I showed in this question.) But after I do that, if I