Add record option maskInputFn for custom mask input function (#409)

This commit is contained in:
Yaozu Lv
2020-11-15 16:39:17 +08:00
committed by GitHub
parent 5c9919e481
commit a2cd3e2da0
3 changed files with 14 additions and 1 deletions

View File

@@ -174,6 +174,7 @@ export type recordOptions<T> = {
ignoreClass?: string;
maskAllInputs?: boolean;
maskInputOptions?: MaskInputOptions;
maskInputFn?: MaskInputFn;
inlineStylesheet?: boolean;
hooks?: hooksParam;
packFn?: PackFn;
@@ -195,6 +196,7 @@ export type observerParam = {
blockClass: blockClass;
ignoreClass: string;
maskInputOptions: MaskInputOptions;
maskInputFn?: MaskInputFn;
inlineStylesheet: boolean;
styleSheetRuleCb: styleSheetRuleCallback;
canvasMutationCb: canvasMutationCallback;
@@ -461,3 +463,5 @@ export enum ReplayerEvents {
Flush = 'flush',
StateChange = 'state-change',
}
export type MaskInputFn = (text: string) => string;