Jump to content

JavaScript Image

stefanmz
Go to solution Solved by elpiop,
  drawimage.drawImage("image",135,305,50,50);

image should not be a string

why do I get this error? The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas or VideoFrame)'
here is my code

 

Link to comment
Share on other sites

Link to post
Share on other sites

  drawimage.drawImage("image",135,305,50,50);

image should not be a string

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, elpiop said:

  drawimage.drawImage("image",135,305,50,50);

image should not be a string

yeah it's a variable thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×