mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Destroy contents when removing view
This commit is contained in:
parent
35d7953b29
commit
4728d09b1d
3 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@
|
|||
|
||||
rendition.display(currentSectionIndex);
|
||||
|
||||
book.ready.then(() => {
|
||||
book.ready.then(function() {
|
||||
|
||||
var next = document.getElementById("next");
|
||||
|
||||
|
|
|
@ -450,7 +450,6 @@ class Contents {
|
|||
clearTimeout(this.expanding);
|
||||
|
||||
requestAnimationFrame(this.resizeCheck.bind(this));
|
||||
|
||||
this.expanding = setTimeout(this.resizeListeners.bind(this), 350);
|
||||
}
|
||||
|
||||
|
|
|
@ -780,6 +780,7 @@ class IframeView {
|
|||
this.displayed = false;
|
||||
|
||||
this.removeListeners();
|
||||
this.contents.destroy();
|
||||
|
||||
this.stopExpanding = true;
|
||||
this.element.removeChild(this.iframe);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue