Viewer: Also send a load event to the window object after the iframe loads

This commit is contained in:
Kovid Goyal 2021-02-15 21:01:10 +05:30
parent 0de82426ff
commit 52d048ece3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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