I have following code to take the screenshot of 'target' division. I found this on a website. But I do not know how " onrendered:function() " works. I want to ask how "onrendered" is used ? And what difference does it make if I do not add " onrendered : " ?
$('#target').html2canvas({ onrendered: function (canvas) { var img = canvas.toDataURL("image/jpg"); } });
onrendered
Gets fired when the final canvas is done converting, and renders. So basically there's a very small amount of time between converting it from html to a canvas.
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.