Skip to content

Commit

Permalink
Apply formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdellanoce committed Oct 27, 2023
1 parent 6a93a53 commit c2e9f31
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions packages/rrweb/src/record/iframe-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ export class IframeManager {
this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl);

if (!iframeEl.contentDocument && iframeEl.contentWindow)
iframeEl.contentWindow.postMessage({
type: "rrweb",
origin: window.location.origin,
snapshot: true
}, "*");
iframeEl.contentWindow.postMessage(
{
type: 'rrweb',
origin: window.location.origin,
snapshot: true,
},
'*',
);
}

public addLoadListener(cb: (iframeEl: HTMLIFrameElement) => unknown) {
Expand Down Expand Up @@ -104,7 +107,11 @@ export class IframeManager {
const iframeSourceWindow = message.source;
if (!iframeSourceWindow) return;

if (iframeSourceWindow == window.parent && window != window.parent && message.data.snapshot) {
if (
iframeSourceWindow == window.parent &&
window != window.parent &&
message.data.snapshot
) {
this.takeFullSnapshot();
return;
}
Expand Down

0 comments on commit c2e9f31

Please sign in to comment.