Commit Graph

202 Commits

Author SHA1 Message Date
Yanzhen Yu
4059b2a469 Release 1.1.3 2021-05-13 02:22:31 +08:00
Yanzhen Yu
0d1dbdd0a7 related to #75 mask password input by default 2021-05-13 02:18:54 +08:00
Justin Halsall
0bb95f1ee7 Allow password to be maskable instead of ignorable (#65)
* Add password to maskInputOptions on types

* Add password on maskInputOptions to types definition
2021-05-13 02:13:44 +08:00
Eoghan Murray
362359eccc Improve parsing of srcset according to whatwg spec (#74)
* Improve parsing of srcset according to whatwg spec; e.g. srcset="http://example.com/size400,300/img.jpg 640w"

* Trim/normalise the output in order to conform to prior version; solely to keep tests happy

* Add test case for embedded commas in a srcset url as well as support for future possible parenthesis in descriptor string

* Drop 'future proof' test as it causes an error message in test output
2021-05-04 13:28:38 +08:00
Yanzhen Yu
7850a75c83 Release 1.1.2 2021-04-22 15:38:27 +08:00
re-fort
a0d82589b7 Enable to mask texts (#73)
* chore: reorder options

* feat: enable 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
2021-04-22 15:34:36 +08:00
Justin Halsall
3c2d7c1eea Speed up addHoverClass on large stylesheets (#72)
* speed up addHoverClass on large style sheets

* longer strings first to prevent accidental partial matches

* can add hover class when there is a multi selector with the same prefix

* tweak performance
2021-04-22 15:32:50 +08:00
Yanzhen Yu
9dfbd522bf Release 1.1.1 2021-03-28 17:51:26 +08:00
Yanzhen Yu
9d6696befd add isShadow flag if a node is under shadow root 2021-03-28 17:49:41 +08:00
Yanzhen Yu
5f96f775e8 update typings 2021-03-21 14:50:35 +08:00
Yanzhen Yu
1192735af4 Release 1.1.0 2021-03-21 14:50:01 +08:00
Yanzhen Yu
88f348a57b snapshot and rebuild shadow DOM
https://github.com/rrweb-io/rrweb/issues/38
2021-03-13 20:46:18 +08:00
Yanzhen Yu
cf5c34592e add typings script to prepack 2021-02-27 18:00:56 +08:00
Eoghan Murray
4bf3073d80 Found an example in the wild of the deprecated pre-css way of adding a background image to table cells (#69) 2021-02-27 17:59:42 +08:00
Yanzhen Yu
8307c87ced using for loop instead of forEach in element classlists
pick #64 and close #68
2021-02-25 21:15:14 +08:00
Province Innovation
dbdf58a29d Valid tag names can include any digit [0-9] (#66) 2021-02-25 09:49:47 +08:00
Justin Halsall
2ad7be639b Adding prepare & prepack npm statement (#67)
* Add prepare & prepack

* Create .npmignore

* remove node_modules, they might be needed
2021-02-19 12:02:13 +08:00
Yanzhen Yu
2a9057d4f2 Release 1.0.7 2021-02-18 12:00:16 +08:00
Yanzhen Yu
a591a53195 safe access iframe document 2021-02-18 11:59:41 +08:00
Yanzhen Yu
1ad1e524e3 Release 1.0.6 2021-02-10 21:28:10 +08:00
Yanzhen Yu
d7668efbcf add iframe load timeout 2021-02-10 21:26:07 +08:00
Yanzhen Yu
1dbe2c1218 Release 1.0.5 2021-02-07 14:01:45 +08:00
yz-yu
98aa732d17 nested record iframe (#63)
* pick nested branch

* iframe snapshot

* temp: add bundle file to git

* revert ignore file

* refactor iframe impl
1. do callback one iframe is loaded, let rrweb handle the rest
2. handle iframe as normal element in rebuild

* rename hook function
2021-02-07 14:00:22 +08:00
Yanzhen Yu
a3ff5e5ea8 Release 1.0.4 2021-02-04 14:49:20 +08:00
Yanzhen Yu
c7f4c36702 fix href value 2021-02-04 14:48:28 +08:00
Yanzhen Yu
c1c687ad93 Release 1.0.3 2021-01-16 21:24:40 +08:00
丶Cccccc
98cc4ee709 bugfix: svg url中id name被误转为绝对路径 (#59)
Co-authored-by: wanglei002 <wanglei002@sensorsdata.cn>
2021-01-16 21:22:45 +08:00
cgf
e1c90aae9a svg xlink:href 路径问题 (#55)
* feat: 修改在svg , xlink:href 相对路径改为绝对路径

* feat: 修改在svg , xlink:href 路径

* feat: 修改在svg, 图片路径问题

* feat: 修改在svg, 图片路径问题

* feat: 修改在svg , xlink:href 路径

Co-authored-by: caogf <caogf@guahao.com>
2021-01-16 21:21:52 +08:00
Yanzhen Yu
7cd09daad0 Release 1.0.2 2021-01-02 14:35:58 +08:00
Yanzhen Yu
1cc7164f2c fix https://github.com/rrweb-io/rrweb-snapshot/issues/56
safe access tagName of form element
2020-12-21 12:37:13 +08:00
Yanzhen Yu
b6ca577f3e Release 1.0.1 2020-11-29 14:38:04 +08:00
Yanzhen Yu
6c2d85049a fix https://github.com/rrweb-io/rrweb/issues/395 2020-11-29 14:37:11 +08:00
Yanzhen Yu
924d2d9911 Release 1.0.0 2020-11-29 13:34:33 +08:00
Yanzhen Yu
852632656f refactoring public API 2020-11-29 13:22:01 +08:00
Yanzhen Yu
555398d3f5 close #38, update data uri regexp 2020-11-21 11:05:08 +08:00
Yanzhen Yu
da182f4927 fix lint 2020-11-21 11:03:43 +08:00
Yanzhen Yu
c489e06acf Release 0.8.4 2020-10-24 16:13:58 +08:00
Karl-Aksel Puulmann
036d3df692 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.
2020-10-24 16:11:39 +08:00
Eoghan Murray
14bdd67459 Add ability to reset the mapping id, to facilitate destructor in rrweb (rrwebRecord.stop) (#49) 2020-10-24 16:10:51 +08:00
Eoghan Murray
b3e7d5a476 Prefer a map and a join as feel it's easier to understand, and I found a case in the wild where Array.prototype.reduce was overwritten (which admittedly is also a danger with map) (#52) 2020-10-15 13:14:57 +08:00
Yanzhen Yu
1251091d64 Release 0.8.3 2020-10-04 20:49:17 +08:00
Yanzhen Yu
57a124ff74 update typings 2020-10-04 20:48:51 +08:00
Eoghan Murray
8b0bc7c505 Preserve url quotes (#47)
* Preserve original quotes when rewriting CSS url() paths - important for inline SVG files which often have spaces

* Found an example in the wild with the 'charset=' part left off. This is supported by https://css-tricks.com/lodge/svg/09-svg-data-uris/ ... not sure why we aren't just testing for the 'data:' prefix here?

* Not sure why this is now coming back with a double quote after recent changes here; it's supposed to preserve the single quote from style.css??
2020-10-04 20:46:57 +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
Yanzhen Yu
fd285ed2c4 Release 0.8.2 2020-09-06 19:15:44 +08:00
Yanzhen Yu
8565b0d692 close #42 fallback to html when doctype is invalid 2020-09-06 16:59:03 +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