File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/rrweb/src/record Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -621,12 +621,19 @@ function record<T = eventWithTime>(
621
621
try {
622
622
handler ( ) ;
623
623
} catch ( error ) {
624
+ const msg = String ( error ) . toLowerCase ( ) ;
624
625
/**
626
+ * https://github.com/rrweb-io/rrweb/pull/1695
625
627
* This error can occur in a known scenario:
626
- * If an iframe is initially same-origin and observed, but later its src attribute is changed to a cross-origin URL,
627
- * attempting to execute the handler in the stop record function will throw a "cannot access cross-origin frame" error.
628
+ * If an iframe is initially same-origin and observed, but later its
629
+ src attribute is changed to a cross-origin URL,
630
+ * attempting to execute the handler in the stop record function will
631
+ throw a "cannot access cross-origin frame" error.
628
632
* This error is expected and can be safely ignored.
629
633
*/
634
+ if ( ! msg . includes ( 'cross-origin' ) ) {
635
+ console . warn ( error ) ;
636
+ }
630
637
}
631
638
} ) ;
632
639
processedNodeManager . destroy ( ) ;
You can’t perform that action at this time.
0 commit comments