mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Replace deselect with more general content access method
This commit is contained in:
+5
-3
@@ -279,9 +279,11 @@ export class FixedLayout extends HTMLElement {
|
||||
if (s) this.#reportLocation()
|
||||
else return this.goToSpread(this.#index - 1, this.rtl ? 'left' : 'right')
|
||||
}
|
||||
deselect() {
|
||||
for (const frame of this.#root.querySelectorAll('iframe'))
|
||||
frame.contentWindow.getSelection().removeAllRanges()
|
||||
getContents() {
|
||||
return Array.from(this.#root.querySelectorAll('iframe'), frame => ({
|
||||
doc: frame.contentDocument,
|
||||
// TODO: index, overlayer
|
||||
}))
|
||||
}
|
||||
destroy() {
|
||||
this.#observer.unobserve(this)
|
||||
|
||||
Reference in New Issue
Block a user