-
Robert Knight authored
Change the way document metadata and URIs for guest frames gets from the guest to the sidebar, so that the guest _pushes_ the information instead of the sidebar requesting it. This achieves two things: 1. It enables the sidebar to get the initial document URI faster, as the guest can fetch the information and send it to the sidebar over the message channel while the sidebar is still loading. This in turn allows the initial annotation search request to be made sooner and for annotations to appear quicker. This fixes https://github.com/hypothesis/client/issues/4094. In practice this doesn't improve the best case metadata fetch time significantly (only 5-10ms or so) but does seem to reduce the variance in fetch times. 2. It will in future enable the guest to inform the sidebar of URI/metadata changes after the initial load. This can happen if a client-side navigation happens in an HTML document for example or if the currently loaded PDF is changed in PDF.js.
d7568d7c