mlibrary / cozy-sun-bear

EPUB widgets and support based around and with code from epub.js
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

have reader fire displayerror on rendition displayerror #221

Closed respinos closed 4 years ago

respinos commented 4 years ago

The reader will fire displayerror if the rendition encounters a display error. The application can listen for this with

reader.on('displayerror', function(err) { ... });

In the case of a network error, err will look something like

{status: 404, message: "<!DOCTYPE html>↵<html lang="en">↵<head>↵<meta char…S/xhtml/09_Chapter02.xhtml</pre>↵</body>↵</html>↵", stack: "Error↵    at XMLHttpRequest.handler (http://localh…080/cozy-sun-bear/dist/cozy-sun-bear.js:23257:14)"}