0

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?

1 Answer 1

1

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).

1
  • Thanks a lot. That's what worked. And did it really amazing! "Say Thanks, Thanks, Thanks!". Commented Nov 13, 2012 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.