mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
add destroy methods
This commit is contained in:
parent
265df07917
commit
db727b00a9
11 changed files with 183 additions and 4 deletions
|
@ -20,7 +20,7 @@
|
|||
<script>
|
||||
var currentSectionIndex = 8;
|
||||
// Load the opf
|
||||
var book = ePub("http://localhost:8080/books/1456.epub");
|
||||
var book = ePub("http://localhost:8080/books/moby-dick.epub");
|
||||
var rendition = book.renderTo("viewer", {
|
||||
width: "100%",
|
||||
height: 600
|
||||
|
@ -88,6 +88,11 @@
|
|||
console.log(location);
|
||||
});
|
||||
|
||||
window.addEventListener("unload", function () {
|
||||
console.log("unloading");
|
||||
this.book.destroy();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue