From 0674543ab15e9ab455db3382b654a67316bbe55b Mon Sep 17 00:00:00 2001 From: Obexer Christoph Date: Mon, 5 Mar 2012 07:54:42 +0100 Subject: [PATCH] cleanup event handers of image objects after use --- src/Preload.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Preload.js b/src/Preload.js index 93723bd..9bbebf7 100644 --- a/src/Preload.js +++ b/src/Preload.js @@ -183,6 +183,7 @@ _html2canvas.Preload = function( options ) { images.numLoaded++; imageObj.succeeded = true; + img.onerror = img.onload = null; start(); }; img.onerror = function() { @@ -207,6 +208,7 @@ _html2canvas.Preload = function( options ) { images.numLoaded++; images.numFailed++; imageObj.succeeded = false; + img.onerror = img.onload = null; start(); };