diff --git a/src/replay/index.ts b/src/replay/index.ts index 79e6c8e2..e72aab82 100644 --- a/src/replay/index.ts +++ b/src/replay/index.ts @@ -296,6 +296,8 @@ export class Replayer { if (this.config.UNSAFE_replayCanvas) { attributes.push('allow-scripts'); } + // hide iframe before first meta event + this.iframe.style.display = 'none'; this.iframe.setAttribute('sandbox', attributes.join(' ')); this.disableInteract(); this.wrapper.appendChild(this.iframe); @@ -308,6 +310,7 @@ export class Replayer { } private handleResize(dimension: viewportResizeDimention) { + this.iframe.style.display = 'inherit'; this.iframe.setAttribute('width', String(dimension.width)); this.iframe.setAttribute('height', String(dimension.height)); } diff --git a/typings/replay/smoothscroll.d.ts b/typings/replay/smoothscroll.d.ts new file mode 100644 index 00000000..562e3df1 --- /dev/null +++ b/typings/replay/smoothscroll.d.ts @@ -0,0 +1 @@ +export declare function polyfill(w?: Window, d?: Document): void;