[Greasemonkey] reading document tree of iframe
Johan Sundström
oyasumi at gmail.com
Tue Aug 8 23:29:40 EDT 2006
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/
More information about the Greasemonkey
mailing list