1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

add destroy methods

This commit is contained in:
Fred Chasen 2017-02-10 15:29:20 -05:00
parent 265df07917
commit db727b00a9
11 changed files with 183 additions and 4 deletions

View file

@ -17,6 +17,14 @@ class PageList {
this.locations = [];
this.epubcfi = new EpubCFI();
this.firstPage = 0;
this.lastPage = 0;
this.totalPages = 0;
this.toc = undefined;
this.ncx = undefined;
this.lastPage
if (xml) {
this.pageList = this.parse(xml);
}
@ -250,6 +258,17 @@ class PageList {
var percentage = this.percentageFromPage(pg);
return percentage;
}
destroy() {
this.pages = undefined;
this.locations = undefined;
this.epubcfi = undefined;
this.pageList = undefined;
this.toc = undefined;
this.ncx = undefined;
}
}
export default PageList;