update Chinese guide doc

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent fac101f3c7
commit fc941aa89e
2 changed files with 23 additions and 9 deletions

View File

@@ -58,17 +58,18 @@ rrweb.record({
});
```
During recording, the recorder will emit when there is some event incurred, all you need to do is to store the emitted events in any way you like.
During recording, the recorder will emit when there is some event incurred, all you need to do is to store the emitted events in any way you like.
The `record` method returns a function which can be called to stop events from firing:
```js
let stopFn = rrweb.record({
emit(event) {
if(events.length > 100){ //stop after 100 events
if (events.length > 100) {
// stop after 100 events
stopFn();
}
}
},
});
```