@@ -202,10 +202,8 @@ export class Replayer {
202
202
203
203
/**
204
204
* Exposes mirror to the plugins
205
+ * We ignore plugins here, as we don't have any
205
206
*/
206
- for ( const plugin of this . config . plugins || [ ] ) {
207
- if ( plugin . getMirror ) plugin . getMirror ( { nodeMirror : this . mirror } ) ;
208
- }
209
207
210
208
this . emitter . on ( ReplayerEvents . Flush , ( ) => {
211
209
if ( this . usingVirtualDom ) {
@@ -236,11 +234,7 @@ export class Replayer {
236
234
else if ( data . source === IncrementalSource . StyleDeclaration )
237
235
this . applyStyleDeclaration ( data , styleSheet ) ;
238
236
} ,
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
244
238
} ;
245
239
if ( this . iframe . contentDocument )
246
240
try {
@@ -723,9 +717,7 @@ export class Replayer {
723
717
castFn ( ) ;
724
718
}
725
719
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
729
721
730
722
this . service . send ( { type : 'CAST_EVENT' , payload : { event } } ) ;
731
723
@@ -778,13 +770,7 @@ export class Replayer {
778
770
const collected : AppendedIframe [ ] = [ ] ;
779
771
const afterAppend = ( builtNode : Node , id : number ) => {
780
772
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
788
774
} ;
789
775
790
776
/**
@@ -877,7 +863,7 @@ export class Replayer {
877
863
type TMirror = typeof mirror extends Mirror ? Mirror : RRDOMMirror ;
878
864
879
865
const collected : AppendedIframe [ ] = [ ] ;
880
- const afterAppend = ( builtNode : Node , id : number ) => {
866
+ const afterAppend = ( builtNode : Node , _id : number ) => {
881
867
this . collectIframeAndAttachDocument ( collected , builtNode ) ;
882
868
const sn = ( mirror as TMirror ) . getMeta ( builtNode as unknown as TNode ) ;
883
869
if (
@@ -892,14 +878,7 @@ export class Replayer {
892
878
}
893
879
894
880
// 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
903
882
} ;
904
883
905
884
buildNodeWithSN ( mutation . node , {
@@ -1519,13 +1498,7 @@ export class Replayer {
1519
1498
) ;
1520
1499
return ;
1521
1500
}
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
1529
1502
1530
1503
const target = buildNodeWithSN ( mutation . node , {
1531
1504
doc : targetDoc as Document , // can be Document or RRDocument
@@ -1537,7 +1510,6 @@ export class Replayer {
1537
1510
* caveat: `afterAppend` only gets called on child nodes of target
1538
1511
* we have to call it again below when this target was added to the DOM
1539
1512
*/
1540
- afterAppend,
1541
1513
} ) as Node | RRNode ;
1542
1514
1543
1515
// legacy data, we should not have -1 siblings any more
@@ -1612,10 +1584,7 @@ export class Replayer {
1612
1584
} else {
1613
1585
( parent as TNode ) . appendChild ( target as TNode ) ;
1614
1586
}
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
1619
1588
1620
1589
/**
1621
1590
* https://github.com/rrweb-io/rrweb/pull/887
0 commit comments