mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 01:35:43 +02:00
Implements onerror for JpegStreams
This commit is contained in:
parent
2282c98500
commit
4c759527d1
1 changed files with 4 additions and 0 deletions
|
@ -1562,5 +1562,9 @@ function loadJpegStream(id, imageUrl, objs) {
|
||||||
img.onload = (function loadJpegStream_onloadClosure() {
|
img.onload = (function loadJpegStream_onloadClosure() {
|
||||||
objs.resolve(id, img);
|
objs.resolve(id, img);
|
||||||
});
|
});
|
||||||
|
img.onerror = (function loadJpegStream_onerrorClosure() {
|
||||||
|
objs.resolve(id, null);
|
||||||
|
warn('Error during JPEG image loading');
|
||||||
|
});
|
||||||
img.src = imageUrl;
|
img.src = imageUrl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue