mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #4969 from timvandermeij/image-loading
Implements onerror for JpegStreams
This commit is contained in:
commit
c4ed02ec0d
1 changed files with 4 additions and 0 deletions
|
@ -1562,5 +1562,9 @@ function loadJpegStream(id, imageUrl, objs) {
|
|||
img.onload = (function loadJpegStream_onloadClosure() {
|
||||
objs.resolve(id, img);
|
||||
});
|
||||
img.onerror = (function loadJpegStream_onerrorClosure() {
|
||||
objs.resolve(id, null);
|
||||
warn('Error during JPEG image loading');
|
||||
});
|
||||
img.src = imageUrl;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue