You can't use any of the page libraries by design. The extension code
and the page code are executed in separate environments designed not
to interfere with each other. So, you can't use page's libraries and
the page can't access extension's code.

Evgeny
InvisibleHand


On Sat, Dec 12, 2009 at 5:37 PM, Frantic <frantic...@gmail.com> wrote:
> Hey,
>
> I'm trying to improve the functionality of some sites with an
> extension via content_scripts + matching.
>
> I have two questions:
>
> 1. Is it possible to make the content_scripts run last after the
> dom:loaded notification?
> As far as I can tell, content_scripts are run as soon as the dom is
> loaded, but before the document's scripts are notified of it.
> This means that I can't really use any of the page's libraries, which
> is bad :(
>
> 2. Is it possible to have a content_script function become global for
> the tab's page scope?
>
> I've tried adding the following to my script:
> function something() {}
> somethingElse = function() {}; (notice no var statement),
>
> Then I reloaded the extension, reloaded the page, opened up an
> inspector console, both something and somethingElse are undefined.
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Chromium-extensions" group.
> To post to this group, send email to chromium-extensi...@googlegroups.com.
> To unsubscribe from this group, send email to 
> chromium-extensions+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/chromium-extensions?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensi...@googlegroups.com.
To unsubscribe from this group, send email to 
chromium-extensions+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to