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

Re: [DOMCore] fire and dispatch

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Tue, 1 Mar 2011 19:21:03 -0500
Message-ID: <AANLkTi=ZMUxOL6CE4Oc3Qv47EmNMA6xLwisDsU=kjuUB@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: 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>
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).
Received on Wednesday, 2 March 2011 00:21:55 UTC

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