• Robert Knight's avatar
    Send frame identifier for guests as part of connection setup · d72c4b1d
    Robert Knight authored
    Guest frames pass an identifier for their associated browser frame to the
    sidebar. The sidebar in turn uses this identifier as a key to refer to different
    guests in various places. This identifier used to be sent as part of the
    `documentInfoChanged` message after a guest <-> sidebar connection is
    established, rather than as part of the initial connection metadata. As a result
    the sidebar had to invent a temporary ID for the new guest, which was used until
    it learned the real ID.
    
    This commit simplifies the picture by adding a `sourceId` attribute to frame
    connection setup messages. This replaces the `frameIdentifier` in the
    `documentInfoChanged` message, and allows the sidebar to know the final ID of
    the guest as soon as it connects.
    d72c4b1d
index.ts 269 Bytes