From b1346280fd61c1f69b39b0d018fb8258e084d311 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Wed, 26 Apr 2023 17:26:13 +0800 Subject: [PATCH] Make range available when reporting current location --- view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view.js b/view.js index da687a2..a36fac7 100644 --- a/view.js +++ b/view.js @@ -91,7 +91,7 @@ export class View { const tocItem = this.#tocProgress.getProgress(index, range) const pageItem = this.#pageProgress.getProgress(index, range) const cfi = this.getCFI(index, range) - this.emit?.({ type: 'relocated', ...progress, tocItem, pageItem, cfi }) + this.emit?.({ type: 'relocated', ...progress, tocItem, pageItem, cfi, range }) } #onLoad(doc, index) { // set language and dir if not already set