i want to execute a function inside a chrome extension (type: content_page), from the injected javascript inside a webpage loaded at a tab.
How can I do?
i want to execute a function inside a chrome extension (type: content_page), from the injected javascript inside a webpage loaded at a tab.
How can I do?
if you mean 'injected' as part of the extension then take a look at the developer documentation for message passing.
if the injected is part of the webpage itself, or another non-extension javascript file, i don't believe there is anyway to accomplish this, or any reason it would even be safe.
if it is a function that resides at the global level, just call it as you would any other function (watch out for collisions though; if it is a common name).