feature: allow embed <replay-web-page> to also support updating favicons from replay (#287)
It may be useful to be able to have <replay-web-page> embed also take over the favicons for the page, propagating them from the replay (eg. if in a single page app where replay takes up most of the view). This PR adds a `updateFavicons` attribute, used as `<replay-web-page ... updateFavicons>` to have icons propagated from the replay to the top-level frame. (This may be especially useful with `deepLink` option, which allows for linking directly to archived pages) Details: - enabled via 'updateFavicons' attribute on <replay-web-page> - pass icons via postMessage() update, adding type to embed message to allow different types of message - currently supporting 'urlchange' and 'favicons' message types - add shared updateFaviconLinks() in misc.ts, used by both embed and main app --------- Co-authored-by: emma <hi@emma.cafe>
This commit is contained in:
@@ -50,3 +50,10 @@ export type ItemType = {
|
||||
totalSize?: unknown;
|
||||
size?: number | string;
|
||||
};
|
||||
|
||||
export type FavIconEventDetail = {
|
||||
icons: {
|
||||
rel: string;
|
||||
href: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user