Update zh_CN Docs (#384)

* update zh_CN guide, with latest API and options

* add receipes

* update receipes and guide

* update #329 add links to README
This commit is contained in:
yz-yu
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 5678e3a062
commit 655f96da61
13 changed files with 621 additions and 43 deletions

View File

@@ -0,0 +1,24 @@
# Canvas
Canvas 是一种特殊的 HTML 元素,默认情况下其内容不会被 rrweb 观测。我们可以通过特定的配置让 rrweb 能够录制并回放 Canvas。
录制时包含 Canvas 内的内容:
```js
rrweb.record({
emit(event) {},
// 对 canvas 进行录制
recordCanvas: true,
});
```
回放时对 Canvas 进行回放:
```js
const replayer = new rrweb.Replayer(events, {
UNSAFE_replayCanvas: true,
});
replayer.play();
```
**回放 Canvas 将会关闭沙盒策略,导致一定风险**