add keepIframeSrcFn option (#81)
* add allowIframe option to snapshot * rename allowIframe to keepIframeSrcFn
This commit is contained in:
4
typings/snapshot.d.ts
vendored
4
typings/snapshot.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { serializedNodeWithId, INode, idNodeMap, MaskInputOptions, SlimDOMOptions, MaskTextFn } from './types';
|
||||
import { serializedNodeWithId, INode, idNodeMap, MaskInputOptions, SlimDOMOptions, MaskTextFn, KeepIframeSrcFn } from './types';
|
||||
export declare const IGNORED_NODE = -2;
|
||||
export declare function absoluteToStylesheet(cssText: string | null, href: string): string;
|
||||
export declare function absoluteToDoc(doc: Document, attributeValue: string): string;
|
||||
@@ -17,6 +17,7 @@ export declare function serializeNodeWithId(n: Node | INode, options: {
|
||||
maskInputOptions?: MaskInputOptions;
|
||||
maskTextFn: MaskTextFn | undefined;
|
||||
slimDOMOptions: SlimDOMOptions;
|
||||
keepIframeSrcFn?: KeepIframeSrcFn;
|
||||
recordCanvas?: boolean;
|
||||
preserveWhiteSpace?: boolean;
|
||||
onSerialize?: (n: INode) => unknown;
|
||||
@@ -37,6 +38,7 @@ declare function snapshot(n: Document, options?: {
|
||||
onSerialize?: (n: INode) => unknown;
|
||||
onIframeLoad?: (iframeINode: INode, node: serializedNodeWithId) => unknown;
|
||||
iframeLoadTimeout?: number;
|
||||
keepIframeSrcFn?: KeepIframeSrcFn;
|
||||
}): [serializedNodeWithId | null, idNodeMap];
|
||||
export declare function visitSnapshot(node: serializedNodeWithId, onVisit: (node: serializedNodeWithId) => unknown): void;
|
||||
export declare function cleanupSnapshot(): void;
|
||||
|
||||
1
typings/types.d.ts
vendored
1
typings/types.d.ts
vendored
@@ -88,3 +88,4 @@ export declare type SlimDOMOptions = Partial<{
|
||||
headMetaVerification: boolean;
|
||||
}>;
|
||||
export declare type MaskTextFn = (text: string) => string;
|
||||
export declare type KeepIframeSrcFn = (src: string) => boolean;
|
||||
|
||||
Reference in New Issue
Block a user