W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [DOMCore] fire and dispatch

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 2 Mar 2011 01:10:57 +0000 (UTC)
To: Aryeh Gregor <Simetrical+w3c@gmail.com>
cc: Boris Zbarsky <bzbarsky@mit.edu>, Ojan Vafai <ojan@chromium.org>, Anne van Kesteren <annevk@opera.com>, Aaron Boodman <aa@chromium.org>, Garrett Smith <dhtmlkitchen@gmail.com>, WebApps WG <public-webapps@w3.org>
Message-ID: <Pine.LNX.4.64.1103020109130.1298@ps20323.dreamhostps.com>
On Tue, 1 Mar 2011, Aryeh Gregor wrote:
> On Tue, Mar 1, 2011 at 8:51 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> > The big worry here is that you have to be _very_ careful to define 
> > behavior properly.  It's not an issue for extension APIs, where you 
> > can assume that the caller will do sane (and probably non-malicious) 
> > things.  But for a web API like this you would need to define exactly 
> > when and how many times the UA is supposed to get the "clientX" 
> > property of the second argument, for example.  That's a minimal 
> > requirement; there are probably other ratholes here that would need 
> > worrying about.  :(
> >
> > Alternately, we could require that all the properties be plain data 
> > properties or something, to avoid some of those pitfalls.
> I think the latter sounds like the right way to go.  I can't imagine any 
> use-case where you'd need to set anything other than regular old 
> properties on the object (and I say that as someone who uses this 
> pattern a lot in my own code).

This is an issue with any of the APIs that use the "structured clone" 
algorithm also. Currently it can cause an infinite loop (if there's a 
getter). If anyone has any advice on how we should fix this problem, 
please comment on this bug:


My current thinking is to just skip over any properties that have getters.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 2 March 2011 01:11:26 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:30 UTC