Re: No-change proposals for WebIDL for constraints

On 12/16/2013 08:13 PM, cowwoc wrote:
> On 16/12/2013 1:31 PM, Martin Thomson wrote:
>> On 16 December 2013 10:05, cowwoc <cowwoc@bbs.darktech.org> wrote:
>>>    [ {"width": 1920, "height": 720} ],
>>>    [ {"width": 1600, "height": 900} ],
>> I hope that those brackets are just a mistake.
> Yes, they are.
>
> I just meant that we should be able to specify multiple constraints 
> per line, instead of one (as is currently the case).
Lines have no significance in Javascript (well.... rarely; another 
strange feature of the language), but the difference between [] and {} 
is significant, and it is important to use the right one.

Your examples are showing an array each of whose elements contains an 
array, each of which has an object with 2 key-value pairs. That's a 
novel structure that I don't see a reason for.

I suggested in the original note that

{ optional:
[
   {"width": 1920, "height": 720},
   {"width": 1600, "height": 900},
] }

which is an array of 2 elements, each containing 2 key-value pairs, 
should be a legal constraint value.

Received on Monday, 16 December 2013 23:12:05 UTC