[whatwg] Canvas Zero/NaN/Infinity issues

Darin Adler darin at apple.com
Wed May 16 10:36:27 PDT 2007


On May 15, 2007, at 6:36 PM, Ian Hickson wrote:

>> For the graphics context functions that take floating point values, I
>> think the specification should say what the expected behavior is for:
>>
>>     1) NANs
>>     2) non-floating point values
>>     3) missing parameters
>> b) excess arguments
>
> 1, 3, and b now raise exceptions except if otherwise specified. I  
> haven't
> yet defined 2. I'm not sure what it should say.

I think that (2) should be the same as (1). I think it makes logical  
sense and matches current implementations. I'm not sure how it should  
be presented or worded.

I think that for (b) we should specify ignoring the additional  
parameters rather than raising an exception. That's more consistent  
with the behavior of the JavaScript language in general, and I'm  
pretty sure all existing implementations do this.

     -- Darin




More information about the whatwg mailing list