renditionInstance.on('locationChanged', (location: Location) => {
// @ts-expect-error - href is not typed
const chapterHref = decodeURIComponent(location.href);
console.log('chapterHref', chapterHref);
const chapters = epubBook.navigation.toc;
console.log('chapters', chapters);
});
I'm trying to find the title of my epubjs with this code, that's what I saw on the internet but apparently it doesn't work anymore, do you have any idea how to get the current chapter?
I'm trying to find the title of my epubjs with this code, that's what I saw on the internet but apparently it doesn't work anymore, do you have any idea how to get the current chapter?