Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/silent-plants-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

Return early for child same origin frames
5 changes: 5 additions & 0 deletions packages/rrweb/src/record/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ function record<T = eventWithTime>(
if (inEmittingFrame && !emit) {
throw new Error('emit function is required');
}
if (!inEmittingFrame && !passEmitsToParent) {
return () => {
/* no-op since in this case we don't need to record anything from this frame in particular */
};
}
// move departed options to new options
if (mousemoveWait !== undefined && sampling.mousemove === undefined) {
sampling.mousemove = mousemoveWait;
Expand Down