On Sun, 28 Oct 2007, Boris Zbarsky wrote: > Jan Wrobel wrote: > > Getting back to the topic. What are your thoughts on this feature? Do you > > think it can be accepted and added to Mozilla? > > My only concern with something like this would be the unpredictable behavior > if > there are multiple consumers who all switch out the streamlistener.
But idea is not to switch out streamlistener but to allow building streamlisteners chain in which original stream listener is the last one. The only unpredictable think here is an order of listeners in this chains. But this is also unpredictable in other already existing functionality. For example if you have multiple extensions that modify request headers in "http-on-modify-request" headers that are sent can be different depending on an order in which this event is passed to extensions. And there is not mechanism to control this order, right? > Well, that and the problem we already have with stream converters: delaying > passing on OnStartRequest breaks things like "save as". This needs to be > more > clearly documented somewhere... OK, so if there is a requirement (clean statement in the documentation) that new listener has to pass OnStartRequest and OnStopRequest to the original listener without any delay it would be OK? For things like Firekeeper delaying OnStartRequest is not necessary and I can't think of an application for which it is. Firekeeper either passes OnStartRequest without any delay or cancels request (doesn't pass OnStartRequest at all). Can such behaviour be the source of some problems? Cheers, Jan _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
