mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-24 14:59:51 -04:00
FXL: fix onLoad callback
Also add deselect method.
This commit is contained in:
1 parent
1fef33731f
commit
b6acb4ff5c
2 files changed
+18
-9
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user