Re: [DOMCore] fire and dispatch

On Tue, Mar 1, 2011 at 5:06 AM, Anne van Kesteren <annevk@opera.com> wrote:
> On Tue, 01 Mar 2011 09:59:59 +0100, Jonas Sicking <jonas@sicking.cc> wrote:
>>
>> We're also using it in IndexedDB, though I don't think this has gotten
>> into the spec drafts yet. But it is in the firefox implementation and
>> I *think* in the chrome implementation.
>
> The issue raised with it last time (by Boris Zbarsky) was the potential for
> the existence of getters. Maybe we can deal with that via JSON or some such?
> Though even then I think I would prefer
>
>  var e = document.createEvent("MouseEvent")
>  e.offsetX = 10
>
> over using an object of some sorts.

I'm not quite sure what you mean by "via JSON" given that JSON is a
serialization format.

There's several ways of solving the getter problem:

1. Don't allow getters, i.e. if the object contains any getters, throw
an exception
2. Run getters and define in which order they are retrieved
3. Treat getters as undefined

Any of these solutions work for me. Ideally WebIDL should provide the
needed hooks so that things can be defined once and reused in multiple
specs.

/ Jonas

Received on Wednesday, 2 March 2011 10:53:04 UTC