add iframe load timeout

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 59c849e429
commit a5d77ea4f0
2 changed files with 47 additions and 22 deletions

View File

@@ -17,6 +17,7 @@ export declare function serializeNodeWithId(n: Node | INode, options: {
preserveWhiteSpace?: boolean;
onSerialize?: (n: INode) => unknown;
onIframeLoad?: (iframeINode: INode, node: serializedNodeWithId) => unknown;
iframeLoadTimeout?: number;
}): serializedNodeWithId | null;
declare function snapshot(n: Document, options?: {
blockClass?: string | RegExp;
@@ -28,6 +29,7 @@ declare function snapshot(n: Document, options?: {
preserveWhiteSpace?: boolean;
onSerialize?: (n: INode) => unknown;
onIframeLoad?: (iframeINode: INode, node: serializedNodeWithId) => unknown;
iframeLoadTimeout?: number;
}): [serializedNodeWithId | null, idNodeMap];
export declare function visitSnapshot(node: serializedNodeWithId, onVisit: (node: serializedNodeWithId) => unknown): void;
export declare function cleanupSnapshot(): void;