我想知道是否有可能在html中有一个canvas标记,我想将一个事件侦听器附加到该标记上,以便每次对其进行编程以绘制某些内容时,回调函数都会执行某些操作,例如增加值或某事
ah I found it! what I needed was a mutationobserver and then going through the addednodes list that it returns to search for the canvas node fyi for anyone in the future here is the resource: https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.