Skip to content

Commit 52c58b3

Browse files
committed
rename props
1 parent 7fa75b5 commit 52c58b3

File tree

1 file changed

+9
-9
lines changed
  • packages/rrweb/src/plugins/network/record

1 file changed

+9
-9
lines changed

packages/rrweb/src/plugins/network/record/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ export type InitiatorType =
2626

2727
type NetworkRecordOptions = {
2828
initiatorType?: InitiatorType[];
29-
captureHeaders?:
29+
recordHeaders?:
3030
| boolean
3131
| StringifyOptions
3232
| {
3333
request: boolean | StringifyOptions;
3434
response: boolean | StringifyOptions;
3535
};
36-
captureBody?:
36+
recordBody?:
3737
| boolean
3838
| StringifyOptions
3939
| {
4040
request: boolean | StringifyOptions;
4141
response: boolean | StringifyOptions;
4242
};
43-
captureInitialEvents?: boolean;
43+
recordInitialEvents?: boolean;
4444
};
4545

4646
const defaultNetworkOptions: NetworkRecordOptions = {
@@ -67,9 +67,9 @@ const defaultNetworkOptions: NetworkRecordOptions = {
6767
'video',
6868
'xmlhttprequest',
6969
],
70-
captureHeaders: false,
71-
captureBody: false,
72-
captureInitialEvents: false,
70+
recordHeaders: false,
71+
recordBody: false,
72+
recordInitialEvents: false,
7373
};
7474

7575
type Headers = Record<string, string>;
@@ -105,7 +105,7 @@ function initPerformanceObserver(
105105
win: IWindow,
106106
options: {
107107
initiatorType: InitiatorType[];
108-
captureInitialEvents: boolean;
108+
recordInitialEvents: boolean;
109109
},
110110
) {
111111
if (!('performance' in win)) {
@@ -129,7 +129,7 @@ function initPerformanceObserver(
129129
);
130130
});
131131
};
132-
if (options.captureInitialEvents) {
132+
if (options.recordInitialEvents) {
133133
const initialPerformanceEntries = getPerformanceEntries(
134134
win.performance.getEntries(),
135135
);
@@ -183,7 +183,7 @@ function initNetworkObserver(
183183
? Object.assign({}, defaultNetworkOptions, options)
184184
: defaultNetworkOptions) as {
185185
initiatorType: InitiatorType[];
186-
captureInitialEvents: boolean;
186+
recordInitialEvents: boolean;
187187
};
188188

189189
const performanceObserver = initPerformanceObserver(cb, win, networkOptions);

0 commit comments

Comments
 (0)