On Tue, 16 Oct 2007, Boris Zbarsky wrote:
>[...]
> Type converters are only automatically invoked for loads that are happening
> in a
> docshell (so essentially toplevel load, frame, iframe).
>
So, currently there is no simple way to capture and filter all the
content browser gets? Is it right?
I would like to propose an improvement that would make it possible.
But I'm not aware if it isn't something developers are already working
on, I can't find any bug related to this issue but maybe I've missed
something.
My idea is to add following interface and make nsChannel implement it:
#include "nsIChannel.idl"
#include "nsIStreamListener.idl"
[scriptable, uuid(969cce1a-c045-4656-a0cb-93bf9a8ebb1a)]
interface nsITraceableChannel : nsIChannel
{
/*
* Channel's listener
*/
attribute nsIStreamListener listener;
};
This interface would allow to get and set StreamListener that was
passed in AsyncOpen call.
To make think simple, it would be sufficient to let the caller replace
listener only before its OnStartRequest() was called.
This solution would make possible replacing StreamListener in the
"on-examine-response" event with a new version that can pass content
to original listener after checking or manipulating it (something very
similar that converter do).
What do you think about this idea.
If it is accepted I can help to implement or test it.
Best regards,
Jan
http://firekeeper.mozdev.org
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network