Does canvas element have “change” event?

后端 未结 4 1032
南笙
南笙 2021-01-17 15:41

Is there a way to attach event handler to a change of a canvas element? I need to fire a function whenever something draws anything on it.

4条回答
  •  臣服心动
    2021-01-17 16:41

    For me I attached a click event on the canvas and I am able to detect if any thing is drawn on that canvas.

    Fiddle here - http://jsfiddle.net/ashwyn/egXhT/2/

    Check for text //Event if Drawn and you will understand where.

提交回复
热议问题