add keepIframeSrcFn option (#592)
* rename allowIframe to keepIframeSrcFn * update rrweb-snapshot to 1.1.5
This commit is contained in:
@@ -66,6 +66,6 @@
|
|||||||
"@xstate/fsm": "^1.4.0",
|
"@xstate/fsm": "^1.4.0",
|
||||||
"fflate": "^0.4.4",
|
"fflate": "^0.4.4",
|
||||||
"mitt": "^1.1.3",
|
"mitt": "^1.1.3",
|
||||||
"rrweb-snapshot": "^1.1.4"
|
"rrweb-snapshot": "^1.1.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ function record<T = eventWithTime>(
|
|||||||
recordCanvas = false,
|
recordCanvas = false,
|
||||||
collectFonts = false,
|
collectFonts = false,
|
||||||
plugins,
|
plugins,
|
||||||
|
keepIframeSrcFn = () => false,
|
||||||
} = options;
|
} = options;
|
||||||
// runtime checks for user options
|
// runtime checks for user options
|
||||||
if (!emit) {
|
if (!emit) {
|
||||||
@@ -236,6 +237,7 @@ function record<T = eventWithTime>(
|
|||||||
onIframeLoad: (iframe, childSn) => {
|
onIframeLoad: (iframe, childSn) => {
|
||||||
iframeManager.attachIframe(iframe, childSn);
|
iframeManager.attachIframe(iframe, childSn);
|
||||||
},
|
},
|
||||||
|
keepIframeSrcFn,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!node) {
|
if (!node) {
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ export type recordOptions<T> = {
|
|||||||
plugins?: RecordPlugin[];
|
plugins?: RecordPlugin[];
|
||||||
// departed, please use sampling options
|
// departed, please use sampling options
|
||||||
mousemoveWait?: number;
|
mousemoveWait?: number;
|
||||||
|
keepIframeSrcFn?: KeepIframeSrcFn;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type observerParam = {
|
export type observerParam = {
|
||||||
@@ -552,3 +553,5 @@ export type ElementState = {
|
|||||||
// [scrollLeft,scrollTop]
|
// [scrollLeft,scrollTop]
|
||||||
scroll?: [number, number];
|
scroll?: [number, number];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type KeepIframeSrcFn = (src: string) => boolean;
|
||||||
|
|||||||
2
typings/types.d.ts
vendored
2
typings/types.d.ts
vendored
@@ -147,6 +147,7 @@ export declare type recordOptions<T> = {
|
|||||||
collectFonts?: boolean;
|
collectFonts?: boolean;
|
||||||
plugins?: RecordPlugin[];
|
plugins?: RecordPlugin[];
|
||||||
mousemoveWait?: number;
|
mousemoveWait?: number;
|
||||||
|
keepIframeSrcFn?: KeepIframeSrcFn;
|
||||||
};
|
};
|
||||||
export declare type observerParam = {
|
export declare type observerParam = {
|
||||||
mutationCb: mutationCallBack;
|
mutationCb: mutationCallBack;
|
||||||
@@ -417,4 +418,5 @@ export declare type MaskTextFn = (text: string) => string;
|
|||||||
export declare type ElementState = {
|
export declare type ElementState = {
|
||||||
scroll?: [number, number];
|
scroll?: [number, number];
|
||||||
};
|
};
|
||||||
|
export declare type KeepIframeSrcFn = (src: string) => boolean;
|
||||||
export {};
|
export {};
|
||||||
|
|||||||
Reference in New Issue
Block a user