test.js
doSomething(){
console.log('Call the function of embadded js file function');
}
I have one test.js file that I have injected into the webpage like
var scriptDom = document.createElement('script');
const url = chrome.runtime.getURL('test.js');
scriptDom['src'] = url;
document.getElementsByTagName("BODY")[0].appendChild(scriptDom);
Now I want to call doSomething()
method from content script is possible to call the injected javascript to call from content script