close #501 do not count attach iframe event in checkout
This commit is contained in:
@@ -30,6 +30,7 @@ export class IframeManager {
|
|||||||
removes: [],
|
removes: [],
|
||||||
texts: [],
|
texts: [],
|
||||||
attributes: [],
|
attributes: [],
|
||||||
|
isAttachIframe: true,
|
||||||
});
|
});
|
||||||
this.loadListener?.((iframeEl as unknown) as HTMLIFrameElement);
|
this.loadListener?.((iframeEl as unknown) as HTMLIFrameElement);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,6 +157,14 @@ function record<T = eventWithTime>(
|
|||||||
lastFullSnapshotEvent = e;
|
lastFullSnapshotEvent = e;
|
||||||
incrementalSnapshotCount = 0;
|
incrementalSnapshotCount = 0;
|
||||||
} else if (e.type === EventType.IncrementalSnapshot) {
|
} else if (e.type === EventType.IncrementalSnapshot) {
|
||||||
|
// attch iframe should be considered as full snapshot
|
||||||
|
if (
|
||||||
|
e.data.source === IncrementalSource.Mutation &&
|
||||||
|
e.data.isAttachIframe
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
incrementalSnapshotCount++;
|
incrementalSnapshotCount++;
|
||||||
const exceedCount =
|
const exceedCount =
|
||||||
checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
|
checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export type SamplingStrategy = Partial<{
|
|||||||
* number is the throttle threshold of mouse/touch move callback
|
* number is the throttle threshold of mouse/touch move callback
|
||||||
*/
|
*/
|
||||||
mousemoveCallback: number;
|
mousemoveCallback: number;
|
||||||
/**
|
/**
|
||||||
* false means not to record mouse interaction events
|
* false means not to record mouse interaction events
|
||||||
* can also specify record some kinds of mouse interactions
|
* can also specify record some kinds of mouse interactions
|
||||||
*/
|
*/
|
||||||
@@ -297,6 +297,7 @@ type mutationCallbackParam = {
|
|||||||
attributes: attributeMutation[];
|
attributes: attributeMutation[];
|
||||||
removes: removedNodeMutation[];
|
removes: removedNodeMutation[];
|
||||||
adds: addedNodeMutation[];
|
adds: addedNodeMutation[];
|
||||||
|
isAttachIframe?: true;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type mutationCallBack = (m: mutationCallbackParam) => void;
|
export type mutationCallBack = (m: mutationCallbackParam) => void;
|
||||||
|
|||||||
Reference in New Issue
Block a user