Commit Graph

167 Commits

Author SHA1 Message Date
Justin Halsall
59b7a39ce1 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>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
a224fdd903 Release 1.0.1 2026-04-01 12:00:00 +08:00
Yanzhen Yu
045e125e37 Release 1.0.0 2026-04-01 12:00:00 +08:00
Yanzhen Yu
de16040917 Release 1.0.0-beta.2 2026-04-01 12:00:00 +08:00
Yanzhen Yu
8f57ba9808 Release 1.0.0-beta.1 2026-04-01 12:00:00 +08:00
Justin Halsall
4dcd674e34 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
2026-04-01 12:00:00 +08:00
bachmanity1
059d492bea add keepIframeSrcFn option (#592)
* rename allowIframe to keepIframeSrcFn

* update rrweb-snapshot to 1.1.5
2026-04-01 12:00:00 +08:00
Yanzhen Yu
53a2e8baa4 Release 1.0.0-beta.0 2026-04-01 12:00:00 +08:00
Justin Halsall
80e7307729 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>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
30f4aa20b3 update rrweb-snapshot 2026-04-01 12:00:00 +08:00
re-fort
b1b25447ff 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
2026-04-01 12:00:00 +08:00
Yanzhen Yu
0e688bba0c impl shadow DOM manager
part of #38
1. observe DOM mutations in shadow DOM
2. rebuild DOM mutations in shadow DOM
2026-04-01 12:00:00 +08:00
Yanzhen Yu
e9d915b3d6 rename node_modules in es bundle to ext 2026-04-01 12:00:00 +08:00
Justin Halsall
e6102bd02f 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
2026-04-01 12:00:00 +08:00
Filip Slatinac
d2f18fa03d Adding prepare npm statement (#490)
* added prepare statement

* using master rrweb snapshot

Co-authored-by: filip slatinac <filipslatinac@MacBook-Pro-2.local>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
64b1c44b3a upgrade rrweb-snapshot to 1.0.7 2026-04-01 12:00:00 +08:00
Moji Izadmehr
2906b0cb22 Add prettier as a dependency (#487) 2026-04-01 12:00:00 +08:00
yz-yu
33f0ac5cfe 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>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
25d23bdc35 read __rrMutationObserver from window 2026-04-01 12:00:00 +08:00
Yanzhen Yu
bbae1dc397 Release 0.9.14 2026-04-01 12:00:00 +08:00
Yanzhen Yu
af699bad4b upgrade 0.9.14 2026-04-01 12:00:00 +08:00
Yanzhen Yu
e6bb01c328 Release 0.9.13 2026-04-01 12:00:00 +08:00
Yanzhen Yu
fbe75532f4 Release 0.9.12 2026-04-01 12:00:00 +08:00
101arrowz
30026bb8f5 Update to fflate (#448)
* Update to fflate

* Update docs, bundler config
2026-04-01 12:00:00 +08:00
Yanzhen Yu
a47e3af343 Release 0.9.11 2026-04-01 12:00:00 +08:00
Yanzhen Yu
f7260da556 Release 0.9.10 2026-04-01 12:00:00 +08:00
Yanzhen Yu
ffa1fa2538 upgrade rrweb-snapshot 2026-04-01 12:00:00 +08:00
Yanzhen Yu
528b8373a0 upgrade to rrweb-snapshot v1.0 2026-04-01 12:00:00 +08:00
Yanzhen Yu
8607cb6071 Release 0.9.9 2026-04-01 12:00:00 +08:00
Yanzhen Yu
e797ecf820 upgrade rrweb-snapshot 2026-04-01 12:00:00 +08:00
Yanzhen Yu
b1291cf48e Release 0.9.8 2026-04-01 12:00:00 +08:00
Yanzhen Yu
5678e3a062 Release 0.9.7 2026-04-01 12:00:00 +08:00
Yanzhen Yu
80172126cf Release 0.9.6 2026-04-01 12:00:00 +08:00
Yanzhen Yu
87e467af79 Release 0.9.5 2026-04-01 12:00:00 +08:00
Yanzhen Yu
8b198b338e impl #309 observe font face set changes 2026-04-01 12:00:00 +08:00
Yanzhen Yu
6c6f9c14da Release 0.9.4 2026-04-01 12:00:00 +08:00
Yanzhen Yu
6651877af9 Release 0.9.3 2026-04-01 12:00:00 +08:00
Yanzhen Yu
07d661f3a2 Release 0.9.2 2026-04-01 12:00:00 +08:00
Yanzhen Yu
6ba84ee5d0 Release 0.9.1 2026-04-01 12:00:00 +08:00
Yanzhen Yu
cd5720644f close #300 upgrade rrweb-snapshot 2026-04-01 12:00:00 +08:00
Yanzhen Yu
4bf7bb9bb1 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.
2026-04-01 12:00:00 +08:00
yz-yu
6fad7f642c 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
2026-04-01 12:00:00 +08:00
Yanzhen Yu
e1c0631eeb Release 0.9.0 2026-04-01 12:00:00 +08:00
Yanzhen Yu
fc66a7eb79 Release 0.8.5 2026-04-01 12:00:00 +08:00
Yanzhen Yu
cf272f65ef Release 0.8.4 2026-04-01 12:00:00 +08:00
Yanzhen Yu
c8cc397418 Release 0.8.3 2026-04-01 12:00:00 +08:00
yz-yu
8bb1c791f5 mask input options and sampling options (#252)
* part of #80, support mask input options

* close #188 enhance sampling options
Use a more general sampling strategy interface to describe the
configuration of sampling events collection.

Implemented mousmove, mouse interaction, scroll and input sampling
strategy.
2026-04-01 12:00:00 +08:00
Yanzhen Yu
9c7e00a6b1 Release 0.8.2 2026-04-01 12:00:00 +08:00
Yanzhen Yu
9a5873005f hotfix: fix es module entry path 2026-04-01 12:00:00 +08:00
Yanzhen Yu
90a42a31da Release 0.8.1 2026-04-01 12:00:00 +08:00