[Greasemonkey] Greasemonkey Imports now available.
Gareth Andrew
freega at freegarethandrew.org
Wed Sep 28 02:47:57 EDT 2005
Aaron,
I totally agree, its just that proper XPCOM scares the life out of me
(I'm not a firefox-hacker, or even much of a javascript guru).
Most of the code is based around the existing codebase -
ImportsDownloader is modelled very closely on ScriptDownloader which
uses xhr.
I originally thought the only problem I had with binary was in the
getContents method (which also performs charset transformation). I
wrote a new getBinaryContents method, but it felt like I was coding
blindfolded, and when I discovered the problem lay with xhr, I'm afraid
I gave up.
I'll have another go, but I think that the api is still very useful for
importing scripts and text, and adding proper binary support is a
back-compatible change, so perhaps the current version could begin to
make its way into CVS anyway as it would be nice to have a few testers.
Gareth
On Tue, 2005-09-27 at 17:09 -0700, Aaron Boodman wrote:
> On 9/27/05, Gareth Andrew <freega at freegarethandrew.org> wrote:
> > Unfortunately I've also had some setbacks and I've had to remove support
> > for binary files, as they don't travel well over xhr. The workaround is
> > to import text files which contain data URI's. This means I've dropped
> > the getDataURI() and the getFileURL() methods, as the former was
> > difficult to write and the latter wasn't of any use and posed a mild
> > security risk.
>
> Let's not make people encode images as data URIs. I'm confident a
> solution can be found to the binary issue. Does the transport *have*
> to be xmlhttprequest? Isn't this all running behind the scenes inside
> Greasemonkey itself? We could just use the proper IO XPCOM interfaces
> directly.
>
> Note I've not looked at this in awhile so I might be way off base. Sorry :-)
>
> --
> Aaron
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
More information about the Greasemonkey
mailing list