2008/6/13, Boris Zbarsky <[EMAIL PROTECTED]>: > Jürgen Herz wrote: >> Wow, that was easy. And works well as far as I tested it. > > Works in what sense?
It does what I want. The JS code is for an overlay and executed if the dialog with that overlay gets opened. The task is to look into the data and adds the result of processing it on the dialog. >> The code to be executed on the data is called when a dialog opens. So >> what to do until the callback is called on onStopRequest by the stream >> listener? > > Nothing? That is, execute the code when onStopRequest happens, not when > you call asyncOpen()? Yeah, ok, I think I figured it. It's upside down to the way it's currently handled. I don't know how to do the processing in the onDataAvailable handler, so I've to buffer the data. How to? Currently using a simple string inside the stream listener object. It seems quite ugly to me to sum up megabytes of data in memory which I maybe don't need, but that's another story. For being compatible with the handling of online and file:// URL, the data must be fed into nsIBinaryInputStream. Currently I'm trying that with nsIStringInputStream shareData(buffer, -1) but it always throws an exception on me. Juergen _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
