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

Le 18/04/2013 04:20, Domenic Denicola a écrit :
> From: Boris Zbarsky [mailto:bzbarsky@MIT.EDU]
>> On 4/17/13 9:58 PM, Domenic Denicola wrote:
>>> That sounds like a bizarre API to me. Access or properties should, as much as possible, behave just like normal data properties.
>> OK.  What would you like to see for the specific API under discussion here?
> Assuming I'm understanding the background reading correctly,
>      myFileInput.files = new FileList([aFile]);
>      myFileInput.files = new FileList([bFile, cFile]);
> seems like the way to go. As long as, generally,
>      var x = someThingOfTheCorrectType;
>      y.z = x;
>      assert(y.z === x);
> passes, then we're in good shape.
A spec nit along the way: note that although I agree with your 
intention, WebIDL imposes to break ===  whenever a conversion is 
performed in a *lot* of occasions. See the step 4 of the attribute 
getter algorithm [1].

That's a nit, but one to be aware of, especially when dealing with 
WebIDL types that are short ints.



Received on Thursday, 18 April 2013 07:40:27 UTC