mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-02 14:49:16 +02:00
add destroy methods
This commit is contained in:
parent
265df07917
commit
db727b00a9
11 changed files with 183 additions and 4 deletions
|
@ -514,8 +514,29 @@ class Rendition {
|
|||
destroy(){
|
||||
// Clear the queue
|
||||
this.q.clear();
|
||||
this.q = undefined;
|
||||
|
||||
this.manager.destroy();
|
||||
this.book = book;
|
||||
|
||||
this.views = null;
|
||||
|
||||
this.hooks.display.clear();
|
||||
this.hooks.serialize.clear();
|
||||
this.hooks.content.clear();
|
||||
this.hooks.layout.clear();
|
||||
this.hooks.render.clear();
|
||||
this.hooks.show.clear();
|
||||
this.hooks = {};
|
||||
|
||||
this.themes.destroy();
|
||||
this.themes = undefined;
|
||||
|
||||
this.epubcfi = undefined;
|
||||
|
||||
this.starting = undefined;
|
||||
this.started = undefined;
|
||||
|
||||
this.manager && this.manager.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue