Commit Graph

1187 Commits

Author SHA1 Message Date
Jonithan
451bde0a29 2 commits for optimizing chore (#53)
* fix: chore bug. Update rollup-plugin-svelte

* chore: move @tsconfig/svelte from devDependencies to dependencies, convenience for building components in other framework and typescrpit

Co-authored-by: lihanzhou <lihanzhou@tencent.com>
2020-12-02 22:07:55 +08:00
Lucky Feng
4e7146e72b feat: enable rrweb to record and replay log messages in console (#424)
* wip: working on rrweb logger

* wip: can record and replay some simple log

* wip: can record and replay log's stack

* wip: try to serialize object

* wip: record and replay console logger

hijack all of the console functions.
add listener to thrown errors

* wip: record and replay console logger
add limit to the max number of log records

* feat: enable rrweb to record and replay log messages in console

this is the implementation of new feature request(issue #234)

here are a few points of description.
1. users need to set recordLog option in rrweb.record's parameter to record log messages.  The log recorder is off by default.
2. support recording and replaying all kinds of console functions. But the reliability of them should be tested more
3. the stringify function in  stringify.ts needs improvement. e.g. robustness, handler for cyclical structures and better support for more kinds of object
4. we can replay the log messages in a simulated html console like LogRocket by implementing the interface "ReplayLogger" in the future

* improve: the stringify function

1. handle cyclical structures
2. add stringify option to limit the length of result
3. handle function type

* refactor: simplify the type definition of ReplayLogger
2020-11-29 18:12:03 +08:00
Yanzhen Yu
e3beeb445a Release 0.9.11 2020-11-29 14:54:55 +08:00
Yanzhen Yu
23a1883dfc pick #286 allow short cut for slim DOM options 2020-11-29 14:54:05 +08:00
Yanzhen Yu
b26cb1a304 update test snapshot 2020-11-29 14:47:05 +08:00
Yanzhen Yu
c420c6b556 Release 0.6.6 2020-11-29 14:44:32 +08:00
Yanzhen Yu
563d866a9a upgrade rrweb 2020-11-29 14:44:15 +08:00
Yanzhen Yu
48edcfbdee Release 0.9.10 2020-11-29 14:41:22 +08:00
Yanzhen Yu
64c5f613ff upgrade rrweb-snapshot 2020-11-29 14:40:28 +08:00
Yanzhen Yu
b6ca577f3e Release 1.0.1 2020-11-29 14:38:04 +08:00
Yanzhen Yu
6c2d85049a fix https://github.com/rrweb-io/rrweb/issues/395 2020-11-29 14:37:11 +08:00
Yanzhen Yu
5a6acbd5f0 fix type error of slim DOM options 2020-11-29 14:26:39 +08:00
Yanzhen Yu
3d5f2e2719 pick #286, export slim DOM options 2020-11-29 14:19:25 +08:00
Yanzhen Yu
a42b6419c3 expose blockSelector as a public option 2020-11-29 13:59:25 +08:00
Yanzhen Yu
7d817be155 upgrade to rrweb-snapshot v1.0 2020-11-29 13:54:37 +08:00
Yanzhen Yu
924d2d9911 Release 1.0.0 2020-11-29 13:34:33 +08:00
Yanzhen Yu
852632656f refactoring public API 2020-11-29 13:22:01 +08:00
Lucky Feng
f9d8fb7844 style: delete a useless constant 2020-11-27 17:52:56 +08:00
Lucky Feng
96e4bfdddd 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
2020-11-27 17:46:52 +08:00
Lucky Feng
658999c6e0 feat: add an option to determine whether to pause CSS animation when playback is paused (#428)
set pauseAnimation to true by default
2020-11-27 16:16:18 +08:00
Lucky Feng
8f3086c18c fix: applyScroll function doesn't work in sync mode(play at a specific time) (#426)
applyScroll function should be called after all of new nodes mounted on dom
2020-11-26 13:40:57 +08:00
Eoghan Murray
facd6cc121 Ensure animations don't continue playing when we've paused playback (#417) 2020-11-25 23:20:04 +08:00
Yanzhen Yu
555398d3f5 close #38, update data uri regexp 2020-11-21 11:05:08 +08:00
Yanzhen Yu
da182f4927 fix lint 2020-11-21 11:03:43 +08:00
Yanzhen Yu
e75277c917 update link style 2020-11-19 16:46:06 +08:00
Yanzhen Yu
6c4f10e4e7 update docs 2020-11-19 16:42:10 +08:00
Yaozu Lv
a2cd3e2da0 Add record option maskInputFn for custom mask input function (#409) 2020-11-15 16:39:17 +08:00
Eoghan Murray
5c9919e481 Allow .on to be chained directly after the constructor so that event handling for the first full snapshot can be added straight after constructor. See #216 (#416) 2020-11-15 16:37:39 +08:00
Yanzhen Yu
284fbcc9e6 add link to rrvideo 2020-11-15 16:04:04 +08:00
Yanzhen Yu
918153c89e Release 0.6.5 2020-11-15 14:43:54 +08:00
Yanzhen Yu
79a8198c03 limit max scale to 1 2020-11-15 14:42:23 +08:00
踩坑小王子
db5b1fe8ac feat: enable to change the config of mouse tail while playing (#410)
fix a potential bug: handleResize function might change the display style of mouseTail
2020-11-10 10:56:21 +08:00
Yanzhen Yu
9434db4a6b Release 0.6.4 2020-10-26 23:36:21 +08:00
Yanzhen Yu
e8dc87add1 upgrade rrweb 2020-10-26 23:35:40 +08:00
Yanzhen Yu
476ae33d7a Release 0.9.9 2020-10-26 23:34:44 +08:00
Yanzhen Yu
c822e344a8 fix serializeNodeWithId args 2020-10-26 23:25:11 +08:00
Yanzhen Yu
fe36b17ebc Release 0.6.3 2020-10-24 23:15:02 +08:00
Yanzhen Yu
e192497b9a upgrade rrweb 2020-10-24 23:14:43 +08:00
yz-yu
55c5038528 Fix CI (#405)
* add yarn.lock to CI

* update travis config

* replace data url by placeholder in CI
2020-10-24 17:34:51 +08:00
Jonithan
c3c8ee3ac8 docs: add “重新制作快照” anchor link and "隐私" anchor link (#399) 2020-10-24 16:38:55 +08:00
Yanzhen Yu
7d5d003325 upgrade rrweb-snapshot 2020-10-24 16:36:06 +08:00
Yanzhen Yu
c489e06acf Release 0.8.4 2020-10-24 16:13:58 +08:00
Karl-Aksel Puulmann
036d3df692 Allow blocking elements by selector (#50)
* Extract method (isElementBlocked) and add tests

* Add blockSelector argument to snapshot

If blockSelector is passed, it will be matched against the element.

Reasoning: Mutating class names can get messy, so providing another hook
helps keep code clean by using data-attributes instead.
2020-10-24 16:11:39 +08:00
Eoghan Murray
14bdd67459 Add ability to reset the mapping id, to facilitate destructor in rrweb (rrwebRecord.stop) (#49) 2020-10-24 16:10:51 +08:00
Yanzhen Yu
6cef61882e optimize the append queue algorithm
Loop the append queue has been proved to be very inefficient, and
some times lead to N^2 time complexity.

Especially when some abnormal data could not be appended into the
real DOM, will make a dead loop.

Previously we use a 5000ms time out to handle this, which is not
user-friendly and not explicitly.

In this patch, we transform the queue into a tree data structure,
which reflects the layout of real DOM. With the tree data structure,
we can find whether there are dangling nodes that need to be dropped.
Also, the iteration will be much more efficient.

There is still a 500ms time out to avoid a dead loop, but should not
be called in expected scenarios.
2020-10-24 15:35:02 +08:00
Yanzhen Yu
0e63852bbc Release 0.9.8 2020-10-23 13:49:37 +08:00
Yanzhen Yu
7c04765752 ignore removed move set 2020-10-23 13:40:13 +08:00
Justin Halsall
07ff4db2a6 Add support for StylesheetRule in document fragment (#293)
* add failing test

* add stylesheet to dom to manipulate the rules

* cleanup
2020-10-17 16:37:32 +08:00
Eoghan Murray
b3e7d5a476 Prefer a map and a join as feel it's easier to understand, and I found a case in the wild where Array.prototype.reduce was overwritten (which admittedly is also a danger with map) (#52) 2020-10-15 13:14:57 +08:00
Karl-Aksel Puulmann
ea0ac76418 Update rrwebPlayer types (#46)
Without this change, the following fails to compile in typescript:

```js
new rrwebPlayer({
                target: document.body,
                props: {
                    width: 900,
                    events,
                    autoPlay: true,
                },
            })
```
2020-10-10 09:05:10 +08:00