W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

Re: Why are dictionary-typed attributes not allowed?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 07 Jun 2012 10:41:06 -0400
Message-ID: <4FD0BD82.2000208@mit.edu>
To: Anne van Kesteren <annevk@annevk.nl>
CC: public-script-coord@w3.org
On 6/7/12 10:18 AM, Anne van Kesteren wrote:
> On Thu, Jun 7, 2012 at 4:11 PM, Boris Zbarsky<bzbarsky@mit.edu>  wrote:
>> There are a bunch of differences (the properties don't have to be on
>> prototypes, etc), but the real question you seem to be asking is why we have
>> dictionaries in the first place, no?  Why do we?
>
> We added them for object initialization. In particular for event
> constructors (but they are used elsewhere too now):
>
> new MouseEvent("click", {"clientX":23, "clientY":50})

Ok, then you're really asking why we allow returning them from methods. 
Why do we?

-Boris
Received on Thursday, 7 June 2012 14:41:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC