1
0
Fork 0
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:
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

@ -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();
}
/**