[Greasemonkey] reading document tree of iframe
Aaron Boodman
zboogs at gmail.com
Tue Aug 8 15:34:32 EDT 2006
I got the impression TOP wanted to modify an existing iframe, for
whatever reason (perhaps there is ajaxy state in there that would get
lost if you re-requested the page). If it was OK to create a new
iframe, then yeah, what you're saying would work.
- a
On 8/8/06, Arvid Jakobsson <arvid.jakobsson at gmail.com> wrote:
> Maybe I just don't understand what you are talking about, but can't
> you just create an empty iframe, GM_xhr that external site and set
> innerHTML of the iframe to the responseText of the GM_xhr?
>
> On 8/8/06, Johan Sundström <oyasumi at gmail.com> wrote:
> > On 8/8/06, Aaron Boodman <zboogs at gmail.com> wrote:
> > > Yeah, Greasemonkey runs in the same reduced permission land that
> > > regular webpages do, which means that it cannot reach across frames
> > > from different domains.
> > >
> > > You might be able to do what you want akwardly by writing two scripts
> > > -- one for the iframe domain and one for parent document domain.
> >
> > Or, if you do it using the same script (set to listen to both URL:s,
> > and differentiating on which location was loaded to run either branch
> > of the script), you could abuse GM_setValue and GM_getValue to
> > establish an elaborate communication protocol between the two frames
> > and GM script environments, aided by a polling setTimeout loop to pass
> > and listen to values between the two branches.
> >
> > *Very* awkward, but doable, in a proof-of-concept kind of way.
> >
> > --
> > / Johan Sundström, http://ecmanaut.blogspot.com/
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list