Neale wrote:
Is what I would like to do theoretically possible, (e.g. by using the
associated nsiChannel) ?
Easily. But you're not; you're using XHR. So this isn't really
on-topic for this newsgroup... that said,
var xhr = ...
// do request
var result = xhr.responseText;
There are tutorials out there on doing this in such a way that |result|
ends up with "binary" data in it. More precisely, such that each
character of |result| is a zero-padded byte value from the response
data. You need to set the right charset, basically. Then you can
URI-encode the bytes and use a data: URI.
window.open("data:text/plain;base64 ," + result);
Oh, if the server returns a base64-encoded string, that's even easier.
Just do that, but use the right MIME type instead of text/plain?
-Boris
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network