mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
It is possible for image tags not to have a 'src' (or background-image) attribute specified. This case currently crashes html2canvas. I know its an edge case but it bit me. I set the image src programatically much later (element is actually not visible at the time I call html2canvas).
This commit is contained in:
parent
962d5b8e8d
commit
7ee7d7fa67
@ -250,7 +250,10 @@ html2canvas.Preload = function(element, opts){
|
||||
|
||||
// load <img> images
|
||||
for (i = 0; i < imgLen; i+=1){
|
||||
methods.loadImage( domImages[i].getAttribute( "src" ) );
|
||||
var imgSrc = domImages[i].getAttribute( "src" );
|
||||
if ( imgSrc ) {
|
||||
methods.loadImage( imgSrc );
|
||||
}
|
||||
}
|
||||
|
||||
// remove 'start'
|
||||
|
Loading…
Reference in New Issue
Block a user