Commit Graph

1219 Commits

Author SHA1 Message Date
jackycoder
ef84f844ae fix polyfill NodeList forEach (#357) 2020-09-20 15:25:50 +08:00
Yanzhen Yu
64efb8c242 close #356 improve loop checker 2020-09-20 15:06:30 +08:00
Yanzhen Yu
c9391a9c92 Release 0.9.5 2020-09-20 14:16:29 +08:00
Yanzhen Yu
8d8e70400b make sure rrweb do not use browser API in static stage 2020-09-20 14:15:19 +08:00
Eoghan Murray
6728d12b3c Add a slimDOM option to strip out unnecessary parts of the DOM (#36)
* Add a `slimDOM` option to strip out unnecessary parts of the DOM in terms of replay

 - <script> tags in the <head> take up unnecessary storage space and are often injected semi randomly to become a source of unnecessary variation between recordings of the same thing
 - comment tags can be stripped out without affecting display
 - future: this option could also turn on more aggressive stripping, e.g. elements that are hidden by CSS (assuming we can handle them becoming visible after mutation events)

* Mark nodes ignored due to slimDOM option, so that they can also be ignored by the mutation observer in rrweb

* Introducing the `ignored` attribute violates the `serializedNodeWithId` type

* slimDOM: Strip out whitespace nodes from <head> element as they have no effect but take up space

 - these would otherwise have to be merged after <script> elements are removed; for statcounter usecase, removing
   <script> elements is no good if there is still a trace of their presence due to the white space (and hence a variant <head> node is still produced)
 - I explored a more radical stripping of all white space nodes, but there is a problem if parent node is <pre> or otherwise rendered with `white-space: pre` and similar.
   detecting applied styles with getComputedStyle would be very expensive (I haven't measured it though)

* Export IGNORED_NODE as a constant instead of relying on the hard-to-grok `-2`

* Remove <link rel=preload as=script> which are similarly as useless as <script> tags

* Make slimDOM configurable with the expecations that `slimDOMOptions: true` will only enable non-destructive options (so not all options may be turned on)

* Expand slimDOM to add options to remove more elements from the <head> that should not be necessary in the replayer context
2020-09-20 13:00:44 +08:00
Justin Halsall
65d0d4e54a child nodes without __sn now remove without error (#307) 2020-09-20 12:58:23 +08:00
Yanzhen Yu
9049f2aef1 close #350 catch error may caused by checkout feature 2020-09-20 12:47:43 +08:00
Yanzhen Yu
9a3e1fe724 fix last played timestamp when it is a mousemove event 2020-09-20 12:37:20 +08:00
Yanzhen Yu
2440701926 impl #309 observe font face set changes 2020-09-17 02:11:34 +08:00
Yanzhen Yu
412f6ca95e Release 0.9.4 2020-09-16 22:57:20 +08:00
Yanzhen Yu
a68684d881 clean up __ln property when remove node 2020-09-16 17:28:07 +08:00
Yanzhen Yu
e1b02d1b67 Release 0.5.6 2020-09-12 17:41:26 +08:00
Yanzhen Yu
22e6b67903 close #33 upgrade rrweb 2020-09-12 17:40:27 +08:00
Yanzhen Yu
81c2e547d8 Release 0.9.3 2020-09-12 17:37:47 +08:00
Yanzhen Yu
3abb2981ec close #322 hook select element selectedIndex property 2020-09-12 17:28:29 +08:00
Yanzhen Yu
8519329e90 close #336 add pointer-events: null to mouse tail wrapper 2020-09-12 15:49:41 +08:00
Yanzhen Yu
dbe1c12cc2 update #324, fix typo 2020-09-12 15:49:15 +08:00
Yanzhen Yu
91dc54c7b8 close #342 send SET_SPEED event when setConfig 2020-09-12 15:12:23 +08:00
DiaNiki
29ff1e9ced Add UNSAFE_replayCanvas. (#36) 2020-09-10 08:43:33 +08:00
Yanzhen Yu
5a1d8b30b0 impl apis: play, pause, goto 2020-09-08 15:09:06 +08:00
Yanzhen Yu
4c0cbfaf6a Release 0.5.5 2020-09-07 22:07:37 +08:00
Yanzhen Yu
1f16bd750f upgrade to rrweb 0.9.2 2020-09-07 22:07:17 +08:00
Yanzhen Yu
52e257627d Release 0.9.2 2020-09-07 22:02:27 +08:00
Yanzhen Yu
41690c755c close #330 implement more accurate finish event 2020-09-07 21:59:57 +08:00
Yanzhen Yu
0688bb6353 close #51 add mouse tail feature 2020-09-07 14:52:57 +08:00
Yanzhen Yu
0256bea4bc hide iframe before first meta event 2020-09-07 12:52:09 +08:00
Yanzhen Yu
c8094c33dc Release 0.9.1 2020-09-07 09:47:17 +08:00
Yanzhen Yu
9b8c7f755f close #161 support "addEvent" in any state 2020-09-07 09:44:03 +08:00
Yanzhen Yu
1bc5aaeb01 close #300 upgrade rrweb-snapshot 2020-09-06 21:34:25 +08:00
Yanzhen Yu
fd285ed2c4 Release 0.8.2 2020-09-06 19:15:44 +08:00
Yanzhen Yu
1e4df37093 close #215 catch delete rule errors 2020-09-06 18:47:08 +08:00
Yanzhen Yu
f52b02f4b1 close #319 handle undefined nextId
Looks like some serializer will omit field with null value, so we
do some checks in the replayer to avoid of dead loop.
2020-09-06 18:24:27 +08:00
Yanzhen Yu
cdebe18803 close #320 use emitter handler to catch before load state 2020-09-06 18:14:11 +08:00
Yanzhen Yu
9f6f9a8c47 close #303 use a fork version of smooth scroll polyfill
The forked version support customize target window and document,
so we can polyfill it to the iframe.
2020-09-06 17:34:29 +08:00
Yanzhen Yu
fa6fd6e2b9 catch unexpected errors during replay media interactions 2020-09-06 17:34:29 +08:00
Yanzhen Yu
8565b0d692 close #42 fallback to html when doctype is invalid 2020-09-06 16:59:03 +08:00
Justin Halsall
df6d08db97 Only trigger waitForStylesheetLoad if not seeking (#326) 2020-09-06 16:49:44 +08:00
Justin Halsall
6934fab78d Update lastPlayedEvent in live mode (#327)
* Update lastPlayedEvent in live mode

* tricking travis-ci into running again
2020-09-05 17:26:48 +08:00
Justin Halsall
e717cda658 Fix live mode (#310)
* add failing test

* paused -> live now possible
2020-08-27 21:33:12 +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
9d58205bf8 Release 0.8.1 2020-08-22 15:50:28 +08:00
Yanzhen Yu
94ea611790 add an option to enable/disable take canvas snapshot 2020-08-22 15:49:55 +08:00
Yanzhen Yu
3c406bd49f rename visit to visitSnapshot 2020-08-22 15:43:50 +08:00
Yanzhen Yu
9bf1ced656 add visit function for snapshot 2020-08-22 15:43:50 +08:00
Yanzhen Yu
e54218be19 provide a general visit function to modify rebuilt id node map 2020-08-22 15:43:50 +08:00
Yanzhen Yu
01b138c650 Release 0.5.4 2020-08-22 00:40:03 +08:00
Yanzhen Yu
74cb44c16b export more public APIs to customize UI 2020-08-22 00:39:29 +08:00
Eoghan Murray
ae476d25a9 Expand what is considered to be a valid tag name to include underscores: (#41)
- was making this change for <wix-image> on Wix websites, but discovered after that this has already been done in e4593ff76d
 - have tested document.createElement('wix-image') and document.createElement('foo_bar'), but can't find a canonical source for what is allowed in tag names.
 - this restriction was originally introduced in #150 to prevent document.createElement('alt=""') i.e. a very malformed tag name
2020-08-21 23:35:17 +08:00
Yanzhen Yu
6c9a48919b dispatch ui events 2020-08-21 18:33:24 +08:00
Yanzhen Yu
a24e376271 Release 0.5.3 2020-08-20 23:27:09 +08:00