IE array indexOf fixes

This commit is contained in:
Niklas von Hertzen 2011-07-18 13:19:46 +03:00
parent 924cd96ab6
commit ea966da911

View File

@ -32,7 +32,7 @@ html2canvas.prototype.getImages = function(el) {
html2canvas.prototype.loadImage = function(src){
var imgIndex = this.images.indexOf(src);
var imgIndex = this.getIndex(this.images,src);
if (imgIndex!=-1){
return this.images[imgIndex+1];
}else{
@ -42,10 +42,13 @@ html2canvas.prototype.loadImage = function(src){
}
html2canvas.prototype.preloadImage = function(src){
if (this.images.indexOf(src)==-1){
if (this.getIndex(this.images,src)==-1){
this.images.push(src);
var img = new Image();