mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Added error handles, sections, updated url resolving, use book.request for requests
This commit is contained in:
parent
c6465177c5
commit
c29e5f84ee
19 changed files with 3049 additions and 683 deletions
|
@ -50,12 +50,16 @@ EPUBJS.Navigation = function(_package, _request){
|
|||
// Load the navigation
|
||||
EPUBJS.Navigation.prototype.load = function(_request) {
|
||||
var request = _request || EPUBJS.core.request;
|
||||
var loading;
|
||||
var loading, loaded;
|
||||
|
||||
if(this.nav) {
|
||||
loading = this.nav.load();
|
||||
} else if(this.ncx) {
|
||||
loading = this.ncx.load();
|
||||
} else {
|
||||
loaded = new RSVP.defer();
|
||||
loaded.resolve([]);
|
||||
loading = loaded.promise;
|
||||
}
|
||||
|
||||
return loading;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue