[Greasemonkey] Re: unsafeWindow.XmlHttpRequest in Greasemonkey 0.6.4
Julien Couvreur
julien.couvreur at gmail.com
Thu Jan 12 09:20:14 EST 2006
I have a side question to add:
Is it possible to leak (on purpose) any GM_ function into the main page?
I'm especially interested in GM_log and GM_XMLHttpRequest.
Thanks,
Julien
On 1/12/06, Julien Couvreur <julien.couvreur at gmail.com> wrote:
> I'm receiving a number of emails from people asking me to fix my
> XmlHttp-related userscripts for FF1.5/GM0.6.4, so I'm trying to
> investigate a bit more.
>
> I've now fixed the problem I had with unsafeWindow. It was indeed a
> bad install. alert(unsafeWindow) now works (shows "[object
> XPCNativeWrapper [object window]]").
> But alert(unsafeWindow.XMLHttpRequest) is null. Is that expected? If so, why?
>
> Basically, I have two scripts: tracing [1] and debugging. The tracing
> one needs to modify the prototype of the XMLHttpRequest used by the
> page and the debugging one (which is more popular) needs to replace
> the XMLHttpRequest constructor in the page context also.
>
> Any suggestions for workarounds?
>
> Thanks,
> Julien
>
> [1] http://blog.monstuff.com/archives/images/XMLHttpRequestTracing.user.js
> [2] http://blog.monstuff.com/archives/images/XMLHttpRequestDebugging.v1.1.user.js
>
More information about the Greasemonkey
mailing list