FXL: fix onLoad callback

Also add deselect method.
This commit is contained in:
John Factotum
2023-03-08 11:40:18 +00:00
committed by GitHub
parent 1fef33731f
commit b6acb4ff5c
2 changed files with 18 additions and 9 deletions
+2 -2
View File
@@ -172,7 +172,7 @@ export class View {
doc.documentElement.lang ||= this.language
doc.documentElement.dir ||= this.isCJK ? '' : this.textDirection
this.renderer.setStyle(this.#css)
this.renderer.setStyle?.(this.#css)
// set handlers for links
const section = book.sections[index]
@@ -281,7 +281,7 @@ export class View {
}
}
deselect() {
return this.renderer?.deselect()
return this.renderer.deselect?.()
}
async getTOCItemOf(target) {
try {