For the time being, you can work around this limitation by taking advantage
of the fact that content scripts can be set to run in all frames on a page.
See the "all_frames" property here:

http://code.google.com/chrome/extensions/content_scripts.html

If the work you want to do in the iframe is somehow dependent on the owner
frame or your content script running there, you could add in some
coordination between the two either via appending <script> tags to the owner
frame, or have the two content scripts exchange messages using the message
passing API:

http://code.google.com/chrome/extensions/messaging.html



On Fri, Nov 27, 2009 at 3:48 PM, Adam Barth <aba...@chromium.org> wrote:

> Yes.  This is a bug I haven't gotten a chance to fix yet.  I'm sorry
> for any inconvenience.
>
> Adam
>
>
> On Fri, Nov 27, 2009 at 1:14 PM, tangore <uknowmew...@gmail.com> wrote:
> > I wrote a content script to access DOM content of a web page.I am able
> > to access the DOM content but when i try to access one iframe
> > contentwindow in that page it is saying as undefined.
> >
> > It is like document.getElementById('iframe') is giving me the iframe
> > but when i try to access document.getElementById
> > ('iframe').contentwindow it is saying undefined.
> >
> > I want to access a javascript function written in the iframe. Usually
> > one can access the javascript function in that iframe using
> > iframeName.function but here if i try to access it is throwing an
> > exception like reference error.
> >
> > Thanks in advance
> >
> > --
> >
> > 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<chromium-extensions%2bunsubscr...@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<chromium-extensions%2bunsubscr...@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