Good idea. I can have a look at it. I'm still not sure how to handle
the case of nested iframes.

Simon

On Fri, Nov 27, 2009 at 7:36 PM, Aaron Boodman <a...@google.com> wrote:
> Can you send that sort of information in the initial message? Like,
> send a field like:
>
> is_top: window == top
>
> ?
>
> - a
>
> On Fri, Nov 27, 2009 at 10:43 AM, Simon Stewart
> <simon.m.stew...@gmail.com> wrote:
>> Hi,
>>
>> How do I track the containment relationship of the ports associated
>> with frames from within an extension? That probably makes no sense, so
>> an example might help :)
>>
>> Chrome loads a page ("http://example.com";) and this page contains an
>> iframe. The URLs for both the main page and the contents of the iframe
>> cause content scripts to load which are marked to "run_at"
>> "document_end". The content scripts connect back to the background
>> page, which will therefore receive two calls to "onConnect". The
>> "port" sent back doesn't give a lot of information, particularly since
>> the "tab" property for both the main content and the iframe is
>> identical.
>>
>> How do I know which port refers to the iframe, and which refers to the
>> main content? In a way which avoid having to execute JS (potentially)
>> across domains?
>>
>> This is for the chrome version of webdriver. One of the APIs allows a
>> user to select which frame is considered "active", and in order to do
>> this we need to understand which port is associated with which frame.
>> In addition, if a user opens a page that contains frames, we can't
>> currently tell which port is the main content and which is the
>> iframe's.
>>
>> Regards,
>>
>> Simon
>>
>> --
>> Chromium Developers mailing list: chromium-dev@googlegroups.com
>> View archives, change email options, or unsubscribe:
>>    http://groups.google.com/group/chromium-dev
>>
>

-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev

Reply via email to