The "top" variable refers to the topmost frame. If you want to access it, you can do: top.document...
Note that this only works if the two frames are running on the same origin. - a On Wed, Aug 26, 2009 at 3:29 PM, The Sailor<[email protected]> wrote: > > Sorry to put in one more question here .... > So, if the current document refers to a document in some iframe .... > is there some way to get to the topmost document ? !! > > > On Aug 26, 1:40 pm, Aaron Boodman <[email protected]> wrote: >> if (window == top) { >> // This is the top-level frame >> >> } >> >> - a >> >> On Wed, Aug 26, 2009 at 1:03 PM, mack<[email protected]> wrote: >> >> > I need to run some logic in the user script (or content_scripts) only >> > once for the browser window, and not for each frame. Is there any way >> > to figure out which is the first (topmost) html element object, so I >> > won't execute the logic for the lower-level frames? >> >> > Thanks! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en -~----------~----~----~----~------~----~------~--~---
