Commit Graph

10 Commits

Author SHA1 Message Date
yz-yu
f3d7fa3451 Impl record iframe (#481)
* Impl record iframe

* iframe observe

* temp: add bundle file to git

* update bundle

* update with pick

* update bundle

* fix fragment map remove

* feat: add an option to determine whether to pause CSS animation when playback is paused (#428)

set pauseAnimation to true by default

* fix: elements would lose some states like scroll position because of "virtual parent" optimization (#427)

* fix: elements would lose some state like scroll position because of "virtual parent" optimization

* refactor: the bugfix code

bug: elements would lose some state like scroll position because of "virtual parent" optimization

* fix: an error occured at applyMutation(remove nodes part)

error message:
Uncaught (in promise) DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node

* pick fixes

* revert ignore file

* re-impl iframe record

* re-impl iframe replay

* code housekeeping

* move multi layer dimension calculation to replay side

* update test cases

* teardown test server

* upgrade rrweb-snapshot with iframe load timeout

Co-authored-by: Lucky Feng <yun.feng@smartx.com>
2021-02-10 21:44:25 +08:00
Yanzhen Yu
2440701926 impl #309 observe font face set changes 2020-09-17 02:11:34 +08:00
yz-yu
772c0e021a record canvas mutations (#296)
* record canvas mutations

close #60, #261

This patch implements the canvas mutation observer.
It consists of both the record and the replay side changes.

In the record side, we add a `recordCanvas` flag to indicate
whether to record canvas elements and the flag defaults to false.
Different from our other observers, the canvas observer was
disabled by default. Because some applications with heavy canvas
usage may emit a lot of data as canvas changed, especially the
scenarios that use a lot of `drawImage` API.
So the behavior should be audited by users and only record canvas
when the flag was set to true.

In the replay side, we add a `UNSAFE_replayCanvas` flag to indicate
whether to replay canvas mutations.
Similar to the `recordCanvas` flag, `UNSAFE_replayCanvas` defaults
to false. But unlike the record canvas implementation is stable and
safe, the replay canvas implementation is UNSAFE.
It's unsafe because we need to add `allow-scripts` to the replay
sandbox, which may cause some unexpected script execution. Currently,
users should be aware of this implementation detail and enable this
feature carefully.

* update canvas integration test
2020-08-22 16:44:02 +08:00
Yanzhen Yu
e3de1f75b9 repl: reset events when start and add types to inquirer prompt 2019-01-13 10:56:59 +08:00
Rongjian Zhang
218dace4ac REPL tool enhancement (#21)
* exit after record saved

* refactor: use inquirer instead of low level readline

* feat: ask user if record another one, instead of exit
2019-01-13 10:45:33 +08:00
Yanzhen Yu
b3edcb30ad fix script tag in repl mode 2018-11-27 15:18:37 +08:00
Yanzhen Yu
2c0a0edf36 basic impl of wait for stylesheet loaded 2018-11-26 18:19:07 +08:00
Yanzhen Yu
2ed5a41708 update dependency 2018-11-23 23:15:51 +08:00
Yanzhen Yu
17fe17b452 add sourcemap for terser bundles 2018-11-23 16:12:24 +08:00
Yanzhen Yu
7343ce4719 refactor the repl tool to support multipage apps and better dev 2018-11-23 16:01:55 +08:00