mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
FXL: fix onLoad callback
Also add deselect method.
This commit is contained in:
@@ -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