Skip to content

Commit

Permalink
Viewer: Also send a load event to the window object after the iframe …
Browse files Browse the repository at this point in the history
…loads
  • Loading branch information
kovidgoyal committed Feb 15, 2021
1 parent 0de8242 commit 52d048e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pyj/read_book/iframe.pyj
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,9 @@ class IframeBoss:

window.setTimeout(self.update_cfi, 0)
window.setTimeout(self.update_toc_position, 0)
load_event = document.createEvent('Event')
load_event.initEvent('load', False, False)
window.dispatchEvent(load_event)

def calculate_progress_frac(self):
current_name = current_spine_item().name
Expand Down

0 comments on commit 52d048e

Please sign in to comment.