W3C home > Mailing lists > Public > public-canvas-api@w3.org > July to September 2010

putImageData() exception

From: Jatinder Mann <jmann@microsoft.com>
Date: Sat, 17 Jul 2010 02:30:01 +0000
To: "'public-canvas-api@w3.org' (public-canvas-api@w3.org)" <public-canvas-api@w3.org>
Message-ID: <EAACC9DF6817544486F0D0ADA05CA4281A53D897@TK5EX14MBXC113.redmond.corp.microsoft.com>
The following text from Section 13 Pixel manipulation [1] is not clear what exception should be raised when the first argument to the putImageData() method is not an ImageData object:  

"If any of the arguments to the method are infinite or NaN, the method must raise a NOT_SUPPORTED_ERR exception.
  If the first argument to the method is null or not an ImageData object then the putImageData() method must raise a TYPE_MISMATCH_ERR exception."

If the first argument is infinite or NaN, should a NOT_SUPPORTED_ERR or TYPE_MISMATCH_ERR be raised? I feel that the intention of the spec was that the first sentence should apply to the numeric arguments to this function.

Can we update the first sentence to state 'numeric arguments', like so:

"If any of the numeric arguments to the method are infinite or NaN, the method must raise a NOT_SUPPORTED_ERR exception.

  If the first argument to the method is null or not an ImageData object then the putImageData() method must raise a TYPE_MISMATCH_ERR exception."

Thanks,
Jatinder

[1] http://www.w3.org/TR/2dcontext/#pixel-manipulation 

Jatinder Mann | Microsoft Program Manager | jmann@microsoft.com
Received on Saturday, 17 July 2010 02:30:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:31:50 UTC