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

@ -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>