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:
parent
265df07917
commit
db727b00a9
11 changed files with 183 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue