Why are the properties of 'top' and 'parent' equal to 'undefined' for
the scripts built-in to frame?
Is there any possibility to access the top-level document from the
script which is running for the frame?

On Sep 23, 12:57 pm, Aaron Boodman <a...@chromium.org> wrote:
> This behavior is by design. If you want to skip frames, you can do this check:
>
> if (window == top) {
>   // You are in the top-level window} else {
>
>   // You are in a frame
>
> }
>
> - a
>
>
>
> On Wed, Sep 23, 2009 at 7:58 AM, disya2 <dis...@gmail.com> wrote:
>
> > Hi,
>
> > I found that my content scripts are injected into every frame and
> > iframe of a web-page. I'm used to think about content script as of
> > something unique to a tab, i.e. 1 tab == 1 content script. Can I do
> > something to prevent loading content script into (i)frames? Is the
> > described behavior intentional or a kind of bug?
>
> > Thanks,
> > Denis

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensions@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