cleanup event handers of image objects after use

This commit is contained in:
Obexer Christoph 2012-03-05 07:54:42 +01:00
parent 8a5b09be70
commit 0674543ab1

View File

@ -183,6 +183,7 @@ _html2canvas.Preload = function( options ) {
images.numLoaded++; images.numLoaded++;
imageObj.succeeded = true; imageObj.succeeded = true;
img.onerror = img.onload = null;
start(); start();
}; };
img.onerror = function() { img.onerror = function() {
@ -207,6 +208,7 @@ _html2canvas.Preload = function( options ) {
images.numLoaded++; images.numLoaded++;
images.numFailed++; images.numFailed++;
imageObj.succeeded = false; imageObj.succeeded = false;
img.onerror = img.onload = null;
start(); start();
}; };