- From: Ian Hickson <ian@hixie.ch>
- Date: Wed, 16 May 2007 23:58:17 +0000 (UTC)
On Wed, 16 May 2007, Darin Adler wrote: > > > > > > 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. On Wed, 16 May 2007, Philip Taylor wrote: > > How is "non-floating point value" defined? Existing implementations seem > to try converting the value into a JS number, which will always give a > floating-point value, and that's just NaN if the conversion is not > possible (e.g. from an object, or undefined, or a string that can't be > parsed as a number). In that case, there aren't really non-floating > point values at all - there are just values that get numberised into NaN > before being passed to the canvas API and are then handled by case 1. > > http://canvex.lazyilluminati.com/misc/nonfloat.html sort of tests that > (though it just checks for exceptions, not for whether strings are > parsed into numbers properly) - it has no errors in Firefox (Minefield), > and in Opera 9.20 it only has errors for unimplemented functions and for > drawImage (bug?). On Wed, 16 May 2007, Darin Adler wrote: > > Sounds great. If we can be clear that passing values to these properties > and functions does a numeric conversion that turns such things into NaN, > then all is well. I don't know where that rule should be stated. Me either. On Wed, 16 May 2007, Darin Adler wrote: > > 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. On Wed, 16 May 2007, Philip Taylor wrote: > > http://canvex.lazyilluminati.com/misc/extra.html - Opera 9.20 ignores > all additional parameters, and Firefox ignores them except for drawImage > and for toDataURL (which is the one place where the spec explicitly says > extra parameters must be allowed - but FF uses them for privileged > content, and throws a security exception if normal content uses them). I've changed the spec to say to ignore extra arguments and raise an exception for too few arguments. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 16 May 2007 16:58:17 UTC