summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolly Ross <sross@redhat.com>2015-12-22 15:16:52 -0500
committerSolly Ross <sross@redhat.com>2016-08-23 15:01:31 -0400
commit6521c6ac0f260fb4719a8805e3799da17d48f35e (patch)
treebf2cc64796baa77d79642f3fc306701c7d9a37ba
parent54fc35248d35d28b5c9430ef3a148bcdb22f6a3e (diff)
downloadnovnc-6521c6ac0f260fb4719a8805e3799da17d48f35e.tar.gz
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.
-rw-r--r--include/display.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/display.js b/include/display.js
index a492817..a6a5722 100644
--- a/include/display.js
+++ b/include/display.js
@@ -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