Commit Graph

26 Commits

Author SHA1 Message Date
Yanzhen Yu
e9ea287bc5 chore(release): publish new version
- rrdom@0.1.0
 - rrweb@1.1.0
 - rrweb-player@0.7.11
 - rrweb-snapshot@1.1.12
2022-01-23 15:53:54 +08:00
Cristi Constantin
69a1b9ffe6 Save images offline, in the snapshot (#770)
* Implemented image restore from rr_dataURL

* Implement saving images in the snapshot

* Fixed image saving, added a test

* Rename data-src to data-rrweb-src

* Updated the guide

* Rename recordImages to inlineImages and try catch
2022-01-11 23:54:58 +08:00
Yanzhen Yu
5a0a1353c5 fix lint 2021-12-26 20:46:17 +08:00
Yanzhen Yu
bdbd204103 chore(release): publish new version
- rrweb@1.0.8
 - rrweb-player@0.7.10
 - rrweb-snapshot@1.1.11
2021-12-23 23:07:03 +08:00
champ
88d3ac152c fix #783 (#785) 2021-12-23 17:40:03 +08:00
Cristi Constantin
ce9e97ffd2 Small regex fix for older browsers (#762) 2021-12-02 19:39:53 +08:00
Yanzhen Yu
1f267082cb update test snapshots 2021-11-16 02:37:48 +08:00
Yanzhen Yu
7223e929a3 chore(release): publish new version
- rrweb@1.0.7
 - rrweb-player@0.7.9
 - rrweb-snapshot@1.1.10
2021-11-16 02:27:22 +08:00
Yanzhen Yu
a01c97f70d try to read style sheet content from JS API 2021-11-16 02:26:49 +08:00
Yanzhen Yu
3d5b43890e close #745, keep textarea text node clean 2021-11-07 10:52:46 +08:00
Justin Halsall
a261f3d4de add root scripts and update contribution guide (#750) 2021-11-06 09:00:07 +08:00
Yanzhen Yu
18d66dca7c do not transform xlink:href when the value is an id
close #566, #741
2021-10-31 11:24:41 +08:00
Eoghan Murray
ad2ca9ee55 Don't throw away information about the iframe src (#733)
* Don't throw away information about the iframe src

* contentDocument is the important one as to whether we are recording an iframe directly
2021-10-26 00:04:44 +08:00
Yanzhen Yu
cabd5eb157 chore(release): publish new version
- rrweb@1.0.6
 - rrweb-player@0.7.8
 - rrweb-snapshot@1.1.9
2021-10-13 00:42:54 +08:00
yz-yu
18e4356be9 migrate to jest (#721)
* migrate rrweb-snapshot tests to jest

* migrate rrweb tests to jest
2021-10-06 15:31:42 +08:00
Yanzhen Yu
2afd4a27e6 upgrade rollup and rollup plugins 2021-10-06 12:14:12 +08:00
Eoghan Murray
333ba18239 Record when a doc is in compatMode and trigger this mode upon replay (#697)
* Hygiene: clean up the xhtml namespace attribute; this is an artefact of the `serializeToString` method which we are using (I think) to be consistent with whitespace and to clean up invalid attributes. I'm removing as was confused as am adding tests related to doctypes

* Record when a document is in `compatMode` and trigger this mode on the iframe upon replay

 https://developer.mozilla.org/en-US/docs/Web/API/Document/compatMode

 the included DOCTYPE was picked up from https://stackoverflow.com/questions/18976213/ - there may be better ways of triggering compatMode

* Don't write an extra DOCTYPE if there's one already present in the snapshot. Rely instead on whatever doctype is there to trigger the BackCompat mode

* Modify to write the correct doctype if we can sniff xhtml - don't have any evidence that this will make a difference

* Dev convenience: Ignore files generated by editors

* Typo fix

* Was getting a 2000ms timeout on the 'before' hook I believe

* Change certain tests to go directly to their localhost page instead of loading the html content programmatically in order to avoid triggering an incorrect BackCompat mode (incorrect in that the html content has a correct doctype)

* Add test based on motivating site that had images lined up in a square which were all different sizes; very old style percentage width/height attributes were doing the right thing in quirksmode, which is what we are testing for here

* Fixup rrweb test html to include a valid doctype and avoid BackCompat to ensure we're not accidentally testing against quirks modes. I didn't find an elegant way of avoiding the `BackCompat` when adding a minimal iframe, so some BackCompat has slipped in here, I don't think there's much harm
2021-10-06 09:34:22 +08:00
Pavel Hurieiev
4ff6e41877 fix(rrweb-snapshot): don't exclude @import CSS rules from the output and use CSSRule.cssText instead when they throw an exception while accessing their CSSStyleSheet.cssRules property (#720) 2021-10-06 09:20:41 +08:00
Yanzhen Yu
8d881b1783 chore(release): publish %s
- rrweb@1.0.3
 - rrweb-player@0.7.5
 - rrweb-snapshot@1.1.8
2021-08-15 15:13:46 +08:00
Yanzhen Yu
9571c36d80 add lerna to manage monorepo 2021-08-14 23:58:56 +08:00
Eoghan Murray
e5b0750e90 Don't trust the html 'value' attribute on <option> - the DOM .selected is the one we want I think. (#651)
- encountered inconsistent html with multiple <option> elements with the same value attribute
 - due to check `attributes.selected = (n as HTMLOptionElement).selected;` the extra ones were being stored as `selected: false`; furthermore, the `false` value was being ignored upon replay, and so the last of the extra ones was being chosen as the 'selected' option
2021-08-14 15:17:17 +08:00
Eoghan Murray
1dc8d688d2 Provide an option to only build rrweb-snapshot for inclusion in rrweb (#649) 2021-07-31 00:15:34 +08:00
Justin Halsall
588164aa12 Cache addHoverClass as it is quite expensive (#643)
* Add cache and cache purging

Needed for https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Add cache and cache purging

Needed for https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Cache addHoverClass as it is quite expensive

https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Make cache non-optional

* Make cache required on addHoverClass
2021-07-26 22:13:03 +08:00
Mark-fenng
4f0d21a053 update links of packages and README 2021-07-23 08:45:29 +08:00
Mark-fenng
6c34ffa7ce moved rrweb into packages/rrweb 2021-07-22 23:43:52 +08:00
Mark-fenng
bc319d510c moved rrweb-snapshot into packages/rrweb-snapshot 2021-07-22 17:54:51 +08:00