nested record iframe (#63)
* pick nested branch * iframe snapshot * temp: add bundle file to git * revert ignore file * refactor iframe impl 1. do callback one iframe is loaded, let rrweb handle the rest 2. handle iframe as normal element in rebuild * rename hook function
This commit is contained in:
2
typings/rebuild.d.ts
vendored
2
typings/rebuild.d.ts
vendored
@@ -5,10 +5,12 @@ export declare function buildNodeWithSN(n: serializedNodeWithId, options: {
|
||||
map: idNodeMap;
|
||||
skipChild?: boolean;
|
||||
hackCss: boolean;
|
||||
afterAppend?: (n: INode) => unknown;
|
||||
}): INode | null;
|
||||
declare function rebuild(n: serializedNodeWithId, options: {
|
||||
doc: Document;
|
||||
onVisit?: (node: INode) => unknown;
|
||||
hackCss?: boolean;
|
||||
afterAppend?: (n: INode) => unknown;
|
||||
}): [Node | null, idNodeMap];
|
||||
export default rebuild;
|
||||
|
||||
5
typings/snapshot.d.ts
vendored
5
typings/snapshot.d.ts
vendored
@@ -15,6 +15,8 @@ export declare function serializeNodeWithId(n: Node | INode, options: {
|
||||
slimDOMOptions: SlimDOMOptions;
|
||||
recordCanvas?: boolean;
|
||||
preserveWhiteSpace?: boolean;
|
||||
onSerialize?: (n: INode) => unknown;
|
||||
onIframeLoad?: (iframeINode: INode, node: serializedNodeWithId) => unknown;
|
||||
}): serializedNodeWithId | null;
|
||||
declare function snapshot(n: Document, options?: {
|
||||
blockClass?: string | RegExp;
|
||||
@@ -23,6 +25,9 @@ declare function snapshot(n: Document, options?: {
|
||||
slimDOM?: boolean | SlimDOMOptions;
|
||||
recordCanvas?: boolean;
|
||||
blockSelector?: string | null;
|
||||
preserveWhiteSpace?: boolean;
|
||||
onSerialize?: (n: INode) => unknown;
|
||||
onIframeLoad?: (iframeINode: INode, node: serializedNodeWithId) => unknown;
|
||||
}): [serializedNodeWithId | null, idNodeMap];
|
||||
export declare function visitSnapshot(node: serializedNodeWithId, onVisit: (node: serializedNodeWithId) => unknown): void;
|
||||
export declare function cleanupSnapshot(): void;
|
||||
|
||||
4
typings/types.d.ts
vendored
4
typings/types.d.ts
vendored
@@ -40,7 +40,9 @@ export declare type commentNode = {
|
||||
type: NodeType.Comment;
|
||||
textContent: string;
|
||||
};
|
||||
export declare type serializedNode = documentNode | documentTypeNode | elementNode | textNode | cdataNode | commentNode;
|
||||
export declare type serializedNode = (documentNode | documentTypeNode | elementNode | textNode | cdataNode | commentNode) & {
|
||||
rootId?: number;
|
||||
};
|
||||
export declare type serializedNodeWithId = serializedNode & {
|
||||
id: number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user