update docs

This commit is contained in:
Yanzhen Yu
2020-11-19 16:42:10 +08:00
parent a2cd3e2da0
commit 6c4f10e4e7
16 changed files with 651 additions and 74 deletions

23
docs/recipes/canvas.md Normal file
View File

@@ -0,0 +1,23 @@
# Canvas
Canvas is a special HTML element, which will not be recorded by rrweb by default. There are some options for recording and replaying Canvas.
Enable recording Canvas
```js
rrweb.record({
emit(event) {},
recordCanvas: true,
});
```
Enable replaying Canvas
```js
const replayer = new rrweb.Replayer(events, {
UNSAFE_replayCanvas: true,
});
replayer.play();
```
**Enable replaying Canvas will remove the sandbox, which may cause a potential security issue.**