Fix ImageData Constructor Support Detection

Our support detection for the `ImageData(data, width, height)` constructor
would fail in certain browsers because the size of a 1x1 ImageData's
Uint8ClampedArray is 4, not 1.
This commit is contained in:
Solly Ross 2015-12-22 15:16:52 -05:00
parent aef8731666
commit e93807ade2
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ var Display;
var SUPPORTS_IMAGEDATA_CONSTRUCTOR = false;
try {
new ImageData(new Uint8ClampedArray(1), 1, 1);
new ImageData(new Uint8ClampedArray(4), 1, 1);
SUPPORTS_IMAGEDATA_CONSTRUCTOR = true;
} catch (ex) {
// ignore failure