How to use [EnforceRange] with union types and enums


The WebIDL spec is a bit slim on how the [EnforceRange] extended 
attribute can be used.

Consider the below case. The LongRage dictionary enforces range on it's 
max and min members. I want to enforce range on the remaining 'long' in 
the Longish typedef. Is it valid to squeeze in the extended attribute in 
the typedef?

void acceptLongish(Longish num);

typedef (long or LongRange) Longish;

dictionary LongRange {
     [EnforceRange] long max;
     [EnforceRange] long min;


Received on Tuesday, 13 September 2016 11:27:29 UTC