• 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
..
components Loading commit data...
config Loading commit data...
helpers Loading commit data...
services Loading commit data...
store Loading commit data...
test Loading commit data...
util Loading commit data...
cross-origin-rpc.js Loading commit data...
icons.js Loading commit data...
index.js Loading commit data...
markdown-commands.js Loading commit data...
media-embedder.js Loading commit data...
render-markdown.js Loading commit data...
search-client.js Loading commit data...
service-context.js Loading commit data...
websocket.js Loading commit data...