Commit Graph

75 Commits

Author SHA1 Message Date
Jason Barry
949c236e29 Fixes missing space when converting srcset to use absolute URLs (#40)
* Fixes missing space when converting srcset to use absolute URLs

* Fix integration snapshot
2026-04-01 12:00:00 +08:00
吴泽康
1c43577807 Add nested scroll support (#31) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
ec7e944a3d add textarea and select to default options 2026-04-01 12:00:00 +08:00
Yanzhen Yu
8592fbd05b support mask select fields 2026-04-01 12:00:00 +08:00
Yanzhen Yu
b4a3d4c66a fix mask textarea 2026-04-01 12:00:00 +08:00
Yanzhen Yu
02123b2874 part of rrweb #80, support configure mask input types 2026-04-01 12:00:00 +08:00
Eoghan Murray
79fe0d1fd8 Don't obscure text of form buttons under maskAllInputs (more modern style would be a <button>) (#35) 2026-04-01 12:00:00 +08:00
Maxim Postautov
f22402d39d add '-' to symbolAndNumberRegex (#34) 2026-04-01 12:00:00 +08:00
Eoghan Murray
dc56ec274a Avoid more common causes of 'blocked script execution' console.error messages in Chrome which are not exceptions (but look like them): (#30)
'Blocked script execution in '<page>' because the document's frame is sandboxed and the 'allow-scripts' permission is not set'
2026-04-01 12:00:00 +08:00
James Bradley
bfaff6b0e1 H tags (#28)
* Failing test

* Allow numbers in el name tests

* Allow numbers in el names
2026-04-01 12:00:00 +08:00
Fizer Khan (பைசர் கான்)
6a34c7a2e5 fix null issue. (#27) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
f29c5abfbc close #24 css text can be null 2026-04-01 12:00:00 +08:00
Yanzhen Yu
35070d9dcc add media state check 2026-04-01 12:00:00 +08:00
Filip Slatinac
44eddcc900 added cssText check (#23)
* added cssText check

* added testing
2026-04-01 12:00:00 +08:00
Filip Slatinac
5c23514fca replacing invalid tag names by div (#22) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
af7f8d9404 export the transform attribute method 2026-04-01 12:00:00 +08:00
Yanzhen Yu
927f754a9d format code 2026-04-01 12:00:00 +08:00
吴泽康
94d64e3424 Add canvas image content support (#20)
* Add canvas image content support

* use rr_dataURL as the key so we know its a rrweb-added attribute.

* fix canvas rr_dataURL rebuild
2026-04-01 12:00:00 +08:00
Filip Slatinac
1467f97f43 Added srcset support (#18)
* added src set as a parsed attribute

* added tests

* changed to /a

* added multiple attribute handling

* added better comment

* made snapshot ignore invalid input as if it is invalid input in the original DOM, it should stay invalid in the recreated DOM

* added extra absolute test case

* code style

* addressed comments
2026-04-01 12:00:00 +08:00
Yanzhen Yu
a860cf9ed5 export add hover class method 2026-04-01 12:00:00 +08:00
Yanzhen Yu
1fc66ffcc5 fix data url regexp 2026-04-01 12:00:00 +08:00
yz-yu
cbe23963a0 add the HACK_CSS flag to bypass css parsing (#16) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
2ba72c3a29 pass mask all input option recursively 2026-04-01 12:00:00 +08:00
dphuang2
939eddcca5 Ignore broken CSS (#15)
Broken CSS inside a page will throw an error on our behalf. This should
be ignored because we are not in control of the CSS on the page we are
recording.
2026-04-01 12:00:00 +08:00
Yanzhen Yu
fbfdafae34 remove child node before set default value 2026-04-01 12:00:00 +08:00
Yanzhen Yu
6457f9ff62 fix #14 fix innerText cap issue 2026-04-01 12:00:00 +08:00
Yanzhen Yu
21e8affa2b Use css parser to add hover class name to selectors.
Previously we use a regexp to match all the CSS selectors and add
our hover class name to it, which has been proved not solid and
may be very slow in some situation.
Using a production ready css parser can handle this better and also
provide ability's to do more accurate things to the recorded
stylesheets.
2026-04-01 12:00:00 +08:00
Yanzhen Yu
6ecaaa2560 add mask all inputs option to snapshot 2026-04-01 12:00:00 +08:00
Yanzhen Yu
1a3b17bae4 format code 2026-04-01 12:00:00 +08:00
Razvan Sandu
149c78802a Allow rendering image tags inside svgs during replay (#13) 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
cf5e17503d pass inline stylesheet option to iteratly 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
Whalefreezer
68b97e40a2 add support for css @import rules (#11) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
11f8a78f71 update typings 2026-04-01 12:00:00 +08:00
Yanzhen Yu
b72e01c2fc accept RegExp type block class config 2026-04-01 12:00:00 +08:00
Sam Mason
e21921a2da Make block css class optional & fix test (#6)
* Make block class optional

* Fix test by removing unexpected space space
2026-04-01 12:00:00 +08:00
Yanzhen Yu
29f2e42978 iterate style element to get css rules string 2026-04-01 12:00:00 +08:00
Yanzhen Yu
67027d8be6 handle empty url path 2026-04-01 12:00:00 +08:00
Yanzhen Yu
205d3b4aeb fix the format and use window.location 2026-04-01 12:00:00 +08:00
Daniël van de Giessen
4ed15164c9 Fixed detection of multiple consecutive CSS URLs without quotes (#4) 2026-04-01 12:00:00 +08:00
Daniël van de Giessen
61c50c2122 Parse style attributes for absolute URL paths (#5) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
6259ae631d add camel case svg element tag names to tag map 2026-04-01 12:00:00 +08:00
Yanzhen Yu
ca8288802f do not add origin before data uri image 2026-04-01 12:00:00 +08:00
Yanzhen Yu
55ce53ffa0 close before open to make sure document was closed 2026-04-01 12:00:00 +08:00
Yanzhen Yu
259a929a76 delete not needed props 2026-04-01 12:00:00 +08:00
Yanzhen Yu
2d1d3596b8 handle block element 2026-04-01 12:00:00 +08:00
Yanzhen Yu
8b470ab6c8 remove _cssText attribute from style element 2026-04-01 12:00:00 +08:00
Yanzhen Yu
c458db3d8e ignore iframe src attribute 2026-04-01 12:00:00 +08:00
Yanzhen Yu
cdedca1716 complately update relative path regexp 2026-04-01 12:00:00 +08:00