@@ -202,10 +202,8 @@ export class Replayer {
202202
203203 /**
204204 * Exposes mirror to the plugins
205+ * We ignore plugins here, as we don't have any
205206 */
206- for ( const plugin of this . config . plugins || [ ] ) {
207- if ( plugin . getMirror ) plugin . getMirror ( { nodeMirror : this . mirror } ) ;
208- }
209207
210208 this . emitter . on ( ReplayerEvents . Flush , ( ) => {
211209 if ( this . usingVirtualDom ) {
@@ -236,11 +234,7 @@ export class Replayer {
236234 else if ( data . source === IncrementalSource . StyleDeclaration )
237235 this . applyStyleDeclaration ( data , styleSheet ) ;
238236 } ,
239- afterAppend : ( node : Node , id : number ) => {
240- for ( const plugin of this . config . plugins || [ ] ) {
241- if ( plugin . onBuild ) plugin . onBuild ( node , { id, replayer : this } ) ;
242- }
243- } ,
237+ // we ignore plugins here, as we don't have any
244238 } ;
245239 if ( this . iframe . contentDocument )
246240 try {
@@ -723,9 +717,7 @@ export class Replayer {
723717 castFn ( ) ;
724718 }
725719
726- for ( const plugin of this . config . plugins || [ ] ) {
727- if ( plugin . handler ) plugin . handler ( event , isSync , { replayer : this } ) ;
728- }
720+ // we ignore plugins here, as we don't have any
729721
730722 this . service . send ( { type : 'CAST_EVENT' , payload : { event } } ) ;
731723
@@ -778,13 +770,7 @@ export class Replayer {
778770 const collected : AppendedIframe [ ] = [ ] ;
779771 const afterAppend = ( builtNode : Node , id : number ) => {
780772 this . collectIframeAndAttachDocument ( collected , builtNode ) ;
781- for ( const plugin of this . config . plugins || [ ] ) {
782- if ( plugin . onBuild )
783- plugin . onBuild ( builtNode , {
784- id,
785- replayer : this ,
786- } ) ;
787- }
773+ // we ignore plugins here, as we don't have any
788774 } ;
789775
790776 /**
@@ -877,7 +863,7 @@ export class Replayer {
877863 type TMirror = typeof mirror extends Mirror ? Mirror : RRDOMMirror ;
878864
879865 const collected : AppendedIframe [ ] = [ ] ;
880- const afterAppend = ( builtNode : Node , id : number ) => {
866+ const afterAppend = ( builtNode : Node , _id : number ) => {
881867 this . collectIframeAndAttachDocument ( collected , builtNode ) ;
882868 const sn = ( mirror as TMirror ) . getMeta ( builtNode as unknown as TNode ) ;
883869 if (
@@ -892,14 +878,7 @@ export class Replayer {
892878 }
893879
894880 // Skip the plugin onBuild callback in the virtual dom mode
895- if ( this . usingVirtualDom ) return ;
896- for ( const plugin of this . config . plugins || [ ] ) {
897- if ( plugin . onBuild )
898- plugin . onBuild ( builtNode , {
899- id,
900- replayer : this ,
901- } ) ;
902- }
881+ // we ignore plugins here, as we don't have any
903882 } ;
904883
905884 buildNodeWithSN ( mutation . node , {
@@ -1519,13 +1498,7 @@ export class Replayer {
15191498 ) ;
15201499 return ;
15211500 }
1522- const afterAppend = ( node : Node | RRNode , id : number ) => {
1523- // Skip the plugin onBuild callback for virtual dom
1524- if ( this . usingVirtualDom ) return ;
1525- for ( const plugin of this . config . plugins || [ ] ) {
1526- if ( plugin . onBuild ) plugin . onBuild ( node , { id, replayer : this } ) ;
1527- }
1528- } ;
1501+ // we ignore plugins here, as we don't have any
15291502
15301503 const target = buildNodeWithSN ( mutation . node , {
15311504 doc : targetDoc as Document , // can be Document or RRDocument
@@ -1537,7 +1510,6 @@ export class Replayer {
15371510 * caveat: `afterAppend` only gets called on child nodes of target
15381511 * we have to call it again below when this target was added to the DOM
15391512 */
1540- afterAppend,
15411513 } ) as Node | RRNode ;
15421514
15431515 // legacy data, we should not have -1 siblings any more
@@ -1612,10 +1584,7 @@ export class Replayer {
16121584 } else {
16131585 ( parent as TNode ) . appendChild ( target as TNode ) ;
16141586 }
1615- /**
1616- * target was added, execute plugin hooks
1617- */
1618- afterAppend ( target , mutation . node . id ) ;
1587+ // we ignore plugins here, as we don't have any
16191588
16201589 /**
16211590 * https://github.com/rrweb-io/rrweb/pull/887
0 commit comments