Chrome Extension : Issue with SendMessage
问题 I am trying to change the contents of a page based on the output of a xhr call. I am sending a message from content.js making the xrh call in the background js file and then passing the output to content.js which alters the content of the page. From my content.js file I am doing the following. var s = document.createElement('script'); s.src = chrome.extension.getURL('src/content/main.js'); (document.head || document.documentElement).appendChild(s); In my main.js I am doing chrome.runtime