Test Test
Test Test

Reputation: 2889

HTML5 Canvas drawImage return

Is there anyway to get this methods return? Just to check if it was executed or not?

context.drawImage(video,0,0,100,200);

Thannks

Upvotes: 1

Views: 1564

Answers (1)

net.uk.sweet
net.uk.sweet

Reputation: 12431

The method returns void (see w3 spec):

  // drawing images
  void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, unrestricted double dx, unrestricted double dy);

There are some good suggestions here on how to unit test canvas code.

Upvotes: 1

Related Questions