Using A Page's Functions In A Chrome Extension
I have a Chrome extension which is injecting some code into a web page (I know that part's working), which is trying to call a function that is part of the original web page. The f
Solution 1:
You can't do it with content scripts. Chrome extensions content scripts live in isolated worlds, meaning they share DOM, but have separate JavaScript sandboxes. Read more here:
The workaround to this is to inject a <script>
into the DOM of the page, but that code won't have privileges to call any chrome.*
APIs.
Post a Comment for "Using A Page's Functions In A Chrome Extension"