2011/7/28 Andreas Rossberg <[email protected]>

> On 28 July 2011 10:35, David Bruant <[email protected]> wrote:
>  > I think we discussed already the idea of "proxy" being passed as a data
> > property to the handler and came to the conclusion that it may not be a
> good
> > idea, because it breaks the stratification. If two proxies use the same
> > handler as in [2], then, there is an ambiguity on what the value of this
> > property should be.
>
> The solution we discussed is to simply use prototypes. That is, share
> handler methods by putting them on a (single) prototype object, and
> have per-proxy instances that carry the individual proxy references
> (or other per-proxy data, for that matter).


I agree that's a good pattern to achieve application-specific per-proxy
handler state, but it doesn't standardize the proxy-backlink, so handler
authors cannot in general rely on the existence of e.g. a |handler.proxy|
property. That precludes the two use cases outlined in my previous mail,
which relate to generic trap code that should work with any proxy handler.

Cheers,
Tom
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to