Skip to content

Commit

Permalink
pick rrweb-io#286 allow short cut for slim DOM options
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuyz0112 committed Nov 29, 2020
1 parent b26cb1a commit 23a1883
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/record/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ function record<T = eventWithTime>(
headMetaAuthorship: _slimDOMOptions === 'all',
headMetaDescKeywords: _slimDOMOptions === 'all',
}
: _slimDOMOptions
? _slimDOMOptions
: {};

polyfill();
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export type recordOptions<T> = {
maskAllInputs?: boolean;
maskInputOptions?: MaskInputOptions;
maskInputFn?: MaskInputFn;
slimDOMOptions?: SlimDOMOptions;
slimDOMOptions?: SlimDOMOptions | 'all' | true;
inlineStylesheet?: boolean;
hooks?: hooksParam;
packFn?: PackFn;
Expand Down
2 changes: 1 addition & 1 deletion typings/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export declare type recordOptions<T> = {
maskAllInputs?: boolean;
maskInputOptions?: MaskInputOptions;
maskInputFn?: MaskInputFn;
slimDOMOptions?: SlimDOMOptions;
slimDOMOptions?: SlimDOMOptions | 'all' | true;
inlineStylesheet?: boolean;
hooks?: hooksParam;
packFn?: PackFn;
Expand Down

0 comments on commit 23a1883

Please sign in to comment.