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

Re: Allowing IDL attributes to have different types for the getter and setter

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 17 Apr 2013 19:13:18 -0700
Message-ID: <CAAWBYDB+Bhbdji4C07GYP=4HTz=dcs5qsRMR=0nuLh2mn9++sQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Apr 17, 2013 at 6:38 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> So a question in terms of API design: from the point of view of JS API
> consumers, does it make sense to have an attribute whose setter, say, takes
> an array of File or Blob objects, or a single File or Blob object, but whose
> getter always returns some object (always the same one) that represents the
> current set of File/Blob objects we've got?  That sort of thing is not
> possible to declare in WebIDL right now.  Should it be?

In other words, it either accepts X and returns [X], or accepts
[X,Y,Z] and returns [X,Y,Z].  Right?

This seems reasonable to me.

~TJ
Received on Thursday, 18 April 2013 02:14:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:12 UTC