• Robert Knight's avatar
    Route guest frame unload notifications via host frame · c56cf3fa
    Robert Knight authored
    Change how the sidebar is notified of guest frames being unloaded to
    support guest frames where the client has been loaded via means other
    than `HypothesisInjector` or where the guest is cross-origin.
    
    Instead of listening for the guest frame's 'unload' event from the
    parent frame in `HypothesisInjector`, the guest frame instead listens
    for this event itself and sends a `hypothesisGuestUnloaded` message to
    the host frame via `window.postMessage`, which in turn is handled in the
    `Sidebar` class to relay it to the sidebar app via a `destroyFrame` RPC
    call. This indirect route works around a bug in Safari (see code
    comments).
    
    As well as supporting future use cases, this also simplifies the
    `HypothesisInjector` class as it no longer needs access to the `Bridge`.
    c56cf3fa
Name
Last commit
Last update
..
integration Loading commit data...
adder-test.js Loading commit data...
annotation-counts-test.js Loading commit data...
annotation-sync-test.js Loading commit data...
bucket-bar-test.js Loading commit data...
cross-frame-test.js Loading commit data...
empty.html Loading commit data...
features-test.js Loading commit data...
frame-observer-test.js Loading commit data...
guest-test.js Loading commit data...
highlighter-test.js Loading commit data...
notebook-test.js Loading commit data...
range-util-test.js Loading commit data...
selection-observer-test.js Loading commit data...
sidebar-test.js Loading commit data...
sidebar-trigger-test.js Loading commit data...
toolbar-test.js Loading commit data...