Commit Graph

172 Commits

Author SHA1 Message Date
Yanzhen Yu
ca8d9701fa Release 1.0.2 2021-07-19 22:29:20 +08:00
Yanzhen Yu
6b01f2489b upgrade rrweb-snapshot to 1.1.7
ignore prefetch and preload script links
close #52, #297, #597

Handle quoted strings in data url
2021-07-18 14:08:03 +08:00
yz-yu
ca8317b56f use prettier instead of node-libtidy (#638) 2021-07-18 10:49:16 +08:00
Justin Halsall
6ef260089f Add check-types to package.json (#627)
* Add type checking to ci

* Update @types/node to version 12

We are using node 12 on ci

* Add check-types to package.json
2021-07-13 23:46:45 +08:00
Justin Halsall
016ad90973 Add type checking to ci (#626)
* Add type checking to ci

* Update @types/node to version 12

We are using node 12 on ci
2021-07-13 22:31:45 +08:00
Justin Halsall
39c8ba1a24 Buffer modifications to virtual stylesheets (#618)
* Fix sheet insertion

Restore skip duration

Use virtualStyleRulesMap to re-populate stylesheet on Flush event

Clear virtualStyleRulesMap after flush applied

* Support rule deletion in virtual processing

* Simply restoreNodeSheet with early aborts

* Encountered a bug where firstFullSnapshot was played twice because timer was immediately started and reached the snapshot before the setTimeout returned

* Ignoring a FullSnapshot needs to be a one-time only thing, as otherwise we'll ignore it after scrubbing (restarting play head at a particular time). This is a problem if mutations have altered the player state, and we try to replay those mutations, so we e.g. try to remove an element that has already been removed because we haven't reset the FullSnapshot state

* Some `npm run typings` related fixups

* add basic html snapshot functionality

* move restoreNodeSheet to it's own module

* Refactor virtual style rules to buffer changes.
Only applies changes on flush.

`virtualStyleRulesMap` now works with strings instead of CSSRules.
CSSRules can only be via made `.insertRule` on CSSStyleSheet in most browsers.
And `new CSSStyleSheet()` only works in Chrome currently.

* remove unused code

* move VirtualStyleRules from CSSRule to string in tests

* correct paths for tests

* naming

* create and restore style snapshots for virtual nodes

* update replayer snapshot

* move storeCSSRules to virtual-styles.ts

* try/catch access to .sheet in case of access errors

* clean up tests

Co-authored-by: Vladimir Milenko <vladimir.milenko@uber.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
2021-07-08 22:34:02 +08:00
Yanzhen Yu
c658ee9e01 Release 1.0.1 2021-07-06 12:13:25 +08:00
Yanzhen Yu
55f7f4f5d2 Release 1.0.0 2021-07-06 00:25:08 +08:00
Yanzhen Yu
924c8991da Release 1.0.0-beta.2 2021-07-01 11:22:52 +08:00
Yanzhen Yu
8082b05254 Release 1.0.0-beta.1 2021-07-01 10:46:47 +08:00
Justin Halsall
ed37401f63 Mask value attribute changes for elements in maskInputOptions (#602)
* mask value attribute changes for elements in maskInputOptions

* refactor initInputObserver to use maskInputValue

* add todo

* Fix typo

* upgrade rrweb-snapshot to 1.1.6

* move maskInputValue to rrweb-snapshot
2021-06-30 23:26:16 +08:00
bachmanity1
dee0457ffe add keepIframeSrcFn option (#592)
* rename allowIframe to keepIframeSrcFn

* update rrweb-snapshot to 1.1.5
2021-06-30 11:51:27 +08:00
Yanzhen Yu
c2e042ca6c Release 1.0.0-beta.0 2021-06-20 21:40:16 +08:00
Justin Halsall
8a9212fed4 Tests: Iframe event order (#568)
* add failing test

* assert order of events

* defer attaching of iframe till FullSnapshot is done
Fixes: https://github.com/rrweb-io/rrweb/issues/567

* correct event order in iframe integration test snapshot

* trigger build

* trigger build

* Move settimeout responsibility to snapshot
https://github.com/rrweb-io/rrweb-snapshot/pull/78

* upgrade rrweb-snapshot to 1.1.4

* DRY record tests

* cleanup

* Upgrade puppeteer to 9.1.1
for (hopefully) more consistent behaviour between CI and development

* make input bigger to prevent triggering scroll events

* page.waitFor is deprecated
more info: https://github.com/puppeteer/puppeteer/issues/6214

* Set os and distro for Travis ci

Co-authored-by: yz-yu <yanzhen@smartx.com>
2021-06-17 21:02:42 +08:00
Yanzhen Yu
2c90543660 update rrweb-snapshot 2021-06-17 20:19:04 +08:00
re-fort
18ad3dae1a Add options to mask texts (#540)
* feat: add options to mask texts

* feat: add the default mask function

* refactor: rename options to identify the difference between  mask text and mask input

* test: add tests about masking

* doc: add options about masking

* chore: bump up rrweb-snapshot version
2021-04-22 16:03:52 +08:00
Yanzhen Yu
df7537b01d impl shadow DOM manager
part of #38
1. observe DOM mutations in shadow DOM
2. rebuild DOM mutations in shadow DOM
2021-03-28 18:16:54 +08:00
Yanzhen Yu
ac60676321 rename node_modules in es bundle to ext 2021-03-21 14:53:51 +08:00
Justin Halsall
918f7f36fe Add yarn support for installing unreleased rrweb as a dependency (#497)
* Use prepack instead of prepare for yarn support

* add prepare and prepack

for yarn v1 & v2 compatibility

* Create .npmignore
2021-02-19 11:57:01 +08:00
Filip Slatinac
7bf1b450f6 Adding prepare npm statement (#490)
* added prepare statement

* using master rrweb snapshot

Co-authored-by: filip slatinac <filipslatinac@MacBook-Pro-2.local>
2021-02-18 21:15:01 +08:00
Yanzhen Yu
1dd393a2de upgrade rrweb-snapshot to 1.0.7 2021-02-18 12:05:31 +08:00
Moji Izadmehr
924a4c8986 Add prettier as a dependency (#487) 2021-02-13 21:50:03 +08:00
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
34c74445ba read __rrMutationObserver from window 2021-02-04 15:00:14 +08:00
Yanzhen Yu
4a73f6de1c Release 0.9.14 2021-01-16 22:33:28 +08:00
Yanzhen Yu
c01d6a9bc1 upgrade 0.9.14 2021-01-16 22:32:28 +08:00
Yanzhen Yu
7f2c242782 Release 0.9.13 2021-01-08 14:07:55 +08:00
Yanzhen Yu
d76e4753f4 Release 0.9.12 2021-01-02 14:59:05 +08:00
101arrowz
e946b69d3f Update to fflate (#448)
* Update to fflate

* Update docs, bundler config
2020-12-22 20:40:37 +08:00
Yanzhen Yu
e3beeb445a Release 0.9.11 2020-11-29 14:54:55 +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
7d817be155 upgrade to rrweb-snapshot v1.0 2020-11-29 13:54:37 +08:00
Yanzhen Yu
476ae33d7a Release 0.9.9 2020-10-26 23:34:44 +08:00
Yanzhen Yu
7d5d003325 upgrade rrweb-snapshot 2020-10-24 16:36:06 +08:00
Yanzhen Yu
0e63852bbc Release 0.9.8 2020-10-23 13:49:37 +08:00
Yanzhen Yu
9488deb6d5 Release 0.9.7 2020-09-23 19:18:21 +08:00
Yanzhen Yu
8065415de6 Release 0.9.6 2020-09-21 14:01:56 +08:00
Yanzhen Yu
c9391a9c92 Release 0.9.5 2020-09-20 14:16:29 +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
81c2e547d8 Release 0.9.3 2020-09-12 17:37:47 +08:00
Yanzhen Yu
52e257627d Release 0.9.2 2020-09-07 22:02:27 +08:00
Yanzhen Yu
c8094c33dc Release 0.9.1 2020-09-07 09:47:17 +08:00
Yanzhen Yu
1bc5aaeb01 close #300 upgrade rrweb-snapshot 2020-09-06 21:34:25 +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
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
5e9e1a2522 Release 0.9.0 2020-08-09 13:10:55 +08:00
Yanzhen Yu
9d24b8c315 Release 0.8.5 2020-07-23 23:48:09 +08:00
Yanzhen Yu
6a58ff28f9 Release 0.8.4 2020-07-19 08:55:51 +08:00