Decrease embedded img size for inlineImages (#836)
* Decrease embedded img size for inlineImages * Fix the test * Use webp for image snapshots * Implemented optional param dataURLOptions
This commit is contained in:
committed by
GitHub
parent
e9531d420a
commit
e104300f25
@@ -1,4 +1,4 @@
|
||||
import { serializedNodeWithId, INode, idNodeMap, MaskInputOptions, SlimDOMOptions, MaskTextFn, MaskInputFn, KeepIframeSrcFn } from './types';
|
||||
import { serializedNodeWithId, INode, idNodeMap, MaskInputOptions, SlimDOMOptions, DataURLOptions, MaskTextFn, MaskInputFn, 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;
|
||||
@@ -18,6 +18,7 @@ export declare function serializeNodeWithId(n: Node | INode, options: {
|
||||
maskTextFn: MaskTextFn | undefined;
|
||||
maskInputFn: MaskInputFn | undefined;
|
||||
slimDOMOptions: SlimDOMOptions;
|
||||
dataURLOptions?: DataURLOptions;
|
||||
keepIframeSrcFn?: KeepIframeSrcFn;
|
||||
inlineImages?: boolean;
|
||||
recordCanvas?: boolean;
|
||||
@@ -36,6 +37,7 @@ declare function snapshot(n: Document, options?: {
|
||||
maskTextFn?: MaskTextFn;
|
||||
maskInputFn?: MaskTextFn;
|
||||
slimDOM?: boolean | SlimDOMOptions;
|
||||
dataURLOptions?: DataURLOptions;
|
||||
inlineImages?: boolean;
|
||||
recordCanvas?: boolean;
|
||||
preserveWhiteSpace?: boolean;
|
||||
|
||||
4
packages/rrweb-snapshot/typings/types.d.ts
vendored
4
packages/rrweb-snapshot/typings/types.d.ts
vendored
@@ -91,6 +91,10 @@ export declare type SlimDOMOptions = Partial<{
|
||||
headMetaAuthorship: boolean;
|
||||
headMetaVerification: boolean;
|
||||
}>;
|
||||
export declare type DataURLOptions = Partial<{
|
||||
type: string;
|
||||
quality: number;
|
||||
}>;
|
||||
export declare type MaskTextFn = (text: string) => string;
|
||||
export declare type MaskInputFn = (text: string) => string;
|
||||
export declare type KeepIframeSrcFn = (src: string) => boolean;
|
||||
|
||||
Reference in New Issue
Block a user