Commit Graph

70 Commits

Author SHA1 Message Date
Yanzhen Yu
097321619c check is dropped and is removed by ancestors instead of only check parent 2018-12-20 15:29:02 +08:00
Yanzhen Yu
2c9db926c0 resolve #1 add ignore and block strategy for privacy purpose 2018-12-02 23:23:21 +08:00
Yanzhen Yu
78967192fc return stopper function as the result of record 2018-12-02 22:37:28 +08:00
Yanzhen Yu
eab30bd274 improve prevent default event when replay 2018-11-23 18:06:19 +08:00
Yanzhen Yu
69c6d96455 update dependencies
In this commit, we updated rrweb-snapshot to 0.6.0 which including
a breaking change in data structure.
2018-11-13 16:21:05 +08:00
Yanzhen Yu
e9add18029 Implement #2: simulate hover event 2018-11-01 13:31:09 +08:00
Yanzhen Yu
cff1617959 fix mutation filter in recorder and change the order of apply mutations in replayer
This change include two critical fix for both recorder and replayer.

In the recorder, previously we filter text and attribute mutations by check its target id,
but this was a wrong approach because removed node also has id at the callback moment.
We corrected this by checking whether the mirror map still has the target id in its keys.

In the replayer side, the issue was we got exceptions when calling insertBefore which says
the ref node was not the child node of the caller node. This will happen when the previous
or next sibling has been removed in the same callback but the previousId or nextId was
recorded.
After apply remove node mutations before add node mutations, we can make sure the removed
siblings will not exist in the mirror map when apply add node mutations. When we get node
from mirror map with an removed id, we will get null and pass it to insertBefore which
is valid.
As a side note, this apply order is safe because we ensured all the remove node mutations
do not include removing newly added nodes in the same callback.
2018-10-31 12:06:41 +08:00
Yanzhen Yu
7b9e57bd6c filter text and attributes mutations which target tot a removed node 2018-10-23 11:48:48 +08:00
Yanzhen Yu
68949a08c3 check added nodes from removed nodes and dropped nodes 2018-10-23 11:28:15 +08:00
Yanzhen Yu
d588f738b8 rewrite mutation observer handler with lazy child list calculation 2018-10-22 23:08:05 +08:00
Yanzhen Yu
a88a79d821 add meta event and fix childList observer, also update related replayer 2018-10-22 10:48:56 +08:00
Yanzhen Yu
49cd7b4db3 align id map by skip extra added nodes 2018-10-16 15:29:52 +08:00
Yanzhen Yu
85a56d2047 fix scroll value and record viewport when loaded 2018-10-12 13:08:03 +08:00
Yanzhen Yu
c07cce74bf improve record method and bump 0.2.0 2018-10-11 17:30:54 +08:00
Yanzhen Yu
40f29e5353 add input event observer and hook the value setter 2018-10-11 16:12:32 +08:00
Yanzhen Yu
46ab1d6e80 serialize newly added nodes and update id node map when childList changed 2018-10-09 10:52:20 +08:00
Yanzhen Yu
1f10b70d30 add scroll and viewport resize observers 2018-10-09 10:33:24 +08:00
Yanzhen Yu
64d4c541ee add mouse interactions observer 2018-10-08 18:37:40 +08:00
Yanzhen Yu
a33b24a676 add mouse movement observer 2018-10-08 17:46:15 +08:00
Yanzhen Yu
427acff3d6 change observed mutations into serializable records 2018-10-08 15:47:21 +08:00