Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Oct 17, 2023
1 parent bd886c4 commit a391577
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions packages/rrweb/src/record/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,16 @@ function record<T = eventWithTime>(
adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit,
});

const iframeManager: IframeManagerInterface = __RRWEB_EXCLUDE_IFRAME__
? new IframeManagerNoop()
: new IframeManager({
mirror,
mutationCb: wrappedMutationEmit,
stylesheetManager: stylesheetManager,
recordCrossOriginIframes,
wrappedEmit,
});
const iframeManager: IframeManagerInterface =
typeof __RRWEB_EXCLUDE_IFRAME__ === 'boolean' && __RRWEB_EXCLUDE_IFRAME__
? new IframeManagerNoop()
: new IframeManager({
mirror,
mutationCb: wrappedMutationEmit,
stylesheetManager: stylesheetManager,
recordCrossOriginIframes,
wrappedEmit,
});

/**
* Exposes mirror to the plugins
Expand All @@ -334,21 +335,23 @@ function record<T = eventWithTime>(

const processedNodeManager = new ProcessedNodeManager();

canvasManager = __RRWEB_EXCLUDE_CANVAS__
? new CanvasManagerNoop()
: new CanvasManager({
recordCanvas,
mutationCb: wrappedCanvasMutationEmit,
win: window,
blockClass,
blockSelector,
unblockSelector,
mirror,
sampling: sampling.canvas,
dataURLOptions,
});
canvasManager =
typeof __RRWEB_EXCLUDE_CANVAS__ === 'boolean' && __RRWEB_EXCLUDE_CANVAS__
? new CanvasManagerNoop()
: new CanvasManager({
recordCanvas,
mutationCb: wrappedCanvasMutationEmit,
win: window,
blockClass,
blockSelector,
unblockSelector,
mirror,
sampling: sampling.canvas,
dataURLOptions,
});

const shadowDomManager: ShadowDomManagerInterface =
typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === 'boolean' &&
__RRWEB_EXCLUDE_SHADOW_DOM__
? new ShadowDomManagerNoop()
: new ShadowDomManager({
Expand Down

0 comments on commit a391577

Please sign in to comment.