[whatwg] Compatibility problems with HTML5 Canvas spec.
Oliver Hunt
oliver at apple.com
Thu Jan 31 22:02:30 PST 2008
I'll try to look at the updated spec later tonight, and see if i can
see if there's anything for which it seems sensible to me for canvas
to throw (or not throw) left in the spec.
My current feeling is that for most operations it is sane to fail
silently for out of bounds numbers, inf, or nan -- but that's just
because i'd prefer people to not have to litter their code with
exception handlers and/or manual bounds checks -- given i assume most
people will just be either ignoring (by catching) exceptions, or make
the call conditional on manually checked values being safe it seems
reasonable to offload such tasks from the developer to the interpreter.
<ramble>
OTOH, there are things like putImageData, drawImage, ... where it
makes sense to throw if you are (for instance) not given correct
*data* -- things like nan, inf, etc can occur as an edge case of many
trivial expressions which make it difficult to check all scenarios
for sane output, but it seems truly bogus for something of a
completely incorrect type to be passed as say the image or ImageData
arguments.
</ramble>
--Oliver
On 31/01/2008, at 9:35 PM, Ian Hickson wrote:
> On Thu, 27 Sep 2007, Anne van Kesteren wrote:
>>
>> Cool! I suppose that leaves the issue about revisiting throwing
>> exception for certain members? Are there any member where it does
>> make
>> to throw an exception? If we decide not to throw an exception
>> something
>> has to be decided for Infinity -Infinity and NaN for all of those. I
>> don't have a strong opinion on it either way, although I would
>> prefer it
>> to be decided quickly so we have some time to propagate the
>> changes in
>> time for Opera 9.5.
>
> Are there any undefined cases you think should be defined? (The
> spec has
> changed significantly in recent days to cover many holes.)
>
> --
> Ian Hickson U+1047E )
> \._.,--....,'``. fL
> http://ln.hixie.ch/ U+263A /, _.. \ _
> \ ;`._ ,.
> Things that are impossible just take longer. `._.-(,_..'--
> (,_..'`-.;.'
More information about the whatwg
mailing list