From 84debbb4d39ff0ba99cd4d8ccf43d07f6114e137 Mon Sep 17 00:00:00 2001 From: InkLab Date: Tue, 14 Jan 2020 17:49:44 -0500 Subject: [PATCH] Added Canvas Elements as valid input to Kernel This small change only allows single canvas elements as kernel input. They have the exact same properties and use cases as html images, bit if you need to use a canvas directly it is more efficient than converting it to an image first. --- src/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.js b/src/utils.js index 1a125df0..1a3a11ff 100644 --- a/src/utils.js +++ b/src/utils.js @@ -144,6 +144,8 @@ const utils = { switch (value.nodeName) { case 'IMG': return 'HTMLImage'; + case 'CANVAS': + return 'HTMLImage'; case 'VIDEO': return 'HTMLVideo'; }