Skip to content

Commit 6be973d

Browse files
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.
1 parent cd0b417 commit 6be973d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ const utils = {
144144
switch (value.nodeName) {
145145
case 'IMG':
146146
return 'HTMLImage';
147+
case 'CANVAS':
148+
return 'HTMLImage';
147149
case 'VIDEO':
148150
return 'HTMLVideo';
149151
}

0 commit comments

Comments
 (0)