-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore "fake" window unload events in PortRPC
In VitalSource custom/synthetic "unload" events are dispatched at the book's container frame when switching chapters. Make sure these don't trigger the code in the `PortRPC` class that is meant to be called when the window is unloaded. These synthetic events were triggered after every chapter navigation. In Safari <= 15 the second and subsequent events would cause an error in the `currentWindow.parent.postMessage` call because the port had already been transferred after the first event was handled.
- Loading branch information
1 parent
5627ba9
commit f5de259
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters