How to call a function from injected script?
问题 This is code from my contentScript.js : function loadScript(script_url) { var head= document.getElementsByTagName('head')[0]; var script= document.createElement('script'); script.type= 'text/javascript'; script.src= chrome.extension.getURL('mySuperScript.js'); head.appendChild(script); someFunctionFromMySuperScript(request.widgetFrame);// ReferenceError: someFunctionFromMySuperScript is not defined } but i got an error when calling a function from injected script: ReferenceError: