1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

fix link event name in rendition

This commit is contained in:
Fred Chasen 2017-10-17 12:17:53 -07:00
parent 16d9c4aa53
commit c6631d10b7
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@
var params = URLSearchParams && new URLSearchParams(document.location.search.substring(1));
var url = params && params.get("url") && decodeURIComponent(params.get("url"));
var currentCfi = (params && params.get("cfi")) ? params.get("cfi") : undefined;
var currentSectionIndex = (params && params.get("loc")) ? parseInt(params.get("loc")) : 6;
var currentSectionIndex = (params && params.get("loc")) ? parseInt(params.get("loc")) : undefined;
// Load the opf
var book = ePub(url || "https://s3.amazonaws.com/moby-dick/");

View file

@ -808,7 +808,7 @@ class Rendition {
handleLinks(contents) {
if (contents) {
contents.on("link", (href) => {
contents.on("linkClicked", (href) => {
let relative = this.book.path.relative(href);
this.display(relative);
});