Commit Graph

15 Commits

Author SHA1 Message Date
Yanzhen Yu
a9ef2cfa83 refactoring public API 2026-04-01 12:00:00 +08:00
Karl-Aksel Puulmann
0c62d31002 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.
2026-04-01 12:00:00 +08:00
Eoghan Murray
65671be739 Add ability to reset the mapping id, to facilitate destructor in rrweb (rrwebRecord.stop) (#49) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
40cf712cfd update typings 2026-04-01 12:00:00 +08:00
Yanzhen Yu
c43189d3fe Release 0.8.1 2026-04-01 12:00:00 +08:00
Yanzhen Yu
41868e2265 rename visit to visitSnapshot 2026-04-01 12:00:00 +08:00
Yanzhen Yu
f9aa4555d8 Release 0.7.28 2026-04-01 12:00:00 +08:00
Yanzhen Yu
64ee0350d7 Release 0.7.25 2026-04-01 12:00:00 +08:00
Yanzhen Yu
0682251ec2 Release 0.7.21 2026-04-01 12:00:00 +08:00
Yanzhen Yu
c5b0f985da Release 0.7.12 2026-04-01 12:00:00 +08:00
Benoît Zugmeyer
ad816f7b7f reuse serialized nodes ids (#12)
* reuse serialized nodes ids

With this patch, each DOM node keeps its id during its existence. This
allows to apply RRWeb events to previous snapshots if needed.

`resetId` has been removed because it loses its meaning: calling it
would not reset the existing nodes ids anymore, only the new ones.

Since we don't reset the id anymore, we may exhaust the available ids
quicker, but Number.MAX_SAFE_INTEGER (2 ** 53 - 1) is pretty large, so I
doubt this'll cause any problem.

* improv TS typing

The `nAsINode` variable was not very elegant.  Simplify this by removing
the cast, and make the INode interface compatible with Node.

* update typings
2026-04-01 12:00:00 +08:00
Yanzhen Yu
c4da047b9f add inline option which can bypass the inline stylesheet 2026-04-01 12:00:00 +08:00
Yanzhen Yu
11f8a78f71 update typings 2026-04-01 12:00:00 +08:00
Yanzhen Yu
76ba992d06 Release 0.7.7 2026-04-01 12:00:00 +08:00
Yanzhen Yu
1534dcf0d8 add typings autogen command 2026-04-01 12:00:00 +08:00