Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleReadyRendition() {
this.updateRenditionTheme(this.themeStyle);
this.rendition.on(EVENTS.RENDITION.RELOCATED, location => this.relocatedHandler(location));
this.rendition.on('keyup', this.handleKeyUps);
this.rendition.on('click', () => this.closeSideBar());
window.addEventListener('mousedown', this.handleMouseDown, { passive: true });
this.loaded = true;
this.book.locations.generate(LOCATIONS_INTERVAL).then(locations => {
this.locations = locations;
this.$emit('startTracking');
this.updateContentStateInterval = setInterval(this.updateProgress, 30000);
// Update current location, .currentLocation() can return Promise or value
Promise.resolve()
.then(() => this.rendition.currentLocation())
.then(currentLocation => {