I found similar time issues related to IE 9 and drew images using HTML5 cnavases, which were discussed in stackoverflow but not exactly the same as mine.
I encountered such a problem that the image loading function is periodically called, but it is not yet ready for drawing on canvas. (The canvas remains blank). Inside onload, the "complete" property of an image is always true, and the "width" and "height" properties always contain the expected values. No exceptions are thrown. If I put a slight delay on loading before drawing the image onto the canvas, I never get an empty draw. I can also bind another attempt to draw an image on an event, like a mouse click, and this is always successful. I do not observe this in Chrome or Firefox. I appreciate any ideas. Thanks!
var canvas = document.createElement('canvas'); canvas.width = 640; canvas.height = 480; var context = canvas.getContext("2d"); var image = new Image(); image.onload = function() {
source share