1. When some same-origin iframes are nested in cross-origin iframes, their `rootId`s are wrong.
2. The property `rootId` is missing in serialized cross-origin iframes
* fix: error data while recording some websites are integrated with stripe
These websites will usually have an iframe with src "https://js.stripe.com/v3/m-outer-xxx.html"
* add test case for the bug
* fix: recordCrossOriginIframes: true does not work with pack/unpack fn
1. bugfix
2. add test case
3. add rrweb-all.js to the result of command: bundle:browser
4. make puppeteer headless in CI by default to increase the speed and stability
* Add test cases for bugs
* Fix shadow dom recording
When moving an element containing shadow dom
When adding an element to shadow dom before its attached to the dom
* Apply formatting changes
* Refactor in dom checking code
* Nodes don't get processed in more than one mutation buffer
* Constrain node mutations to one mutation buffer per request animation frame
* Make tests less flaky under heavy load
* Apply suggestions from code review
* Update packages/rrweb-snapshot/test/rebuild.test.ts
* Remove unused nodeSet
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* fix: adoptedStyleSheets in shadow doms are missed when a full snapshot is checked out after recording has started
* fix: avoid removing monkey patch of all existed shadow doms when take a new full snapshot
* Apply formatting changes
* Update packages/rrweb/test/record.test.ts
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* fix typo
* update outdated snapshot
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* fix: module error
refactor all suffix of bundled scripts with commonjs module from 'js' to cjs
error:
ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '.../rrweb/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
* update jest config files
* Upgrade puppeteer to 17.1.3 in rrweb-snapshot
* Apply formatting changes
* Add ?
* Make tests less flakey
* Make attribute-setting more explicit
* Make test less flakey
* Make test less flakey
* Upgrade puppeteer for rrdom
* Use wait for request animation frame instead of timeout
* Force append to happen in second event
* Wait till iframe was loaded (now 100ms)
* Round the currentTime to 1 decimal place
* Fix issue where only indication I could see in any attribute that the document was scrolling was on `window.pageYOffset`, so we hadn't been able to replay scrolling
* Apply formatting changes
* Update observer.ts
help you fix typescript error
* Update utils.ts
help you fix typescript error
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Add `recordCrossOriginIframe` setting
* Set up messaging between iframes
* should emit full snapshot event from iframe as mutation event
* this.mirror was dropped on attachIframe
* should use unique id for child of iframe
* Cross origin iframe recording in `yarn live-stream`
* Root iframe check thats supported by firefox
* Live stream: Inject script in all frames
* Record same origin and cross origin iframes differently
* Should map Input events correctly
* Turn on other tests
* Fix compatibility with newer puppeteer
* puppeteer vs 12 seems stable without to many changes needed
* normalize port numbers in snapshots
* Handle scroll and ViewportResize events in cross origin iframe
* Correctly map cross origin mutations
* Map selection events for cross origin iframes
* Map canvas mutations for cross origin iframes
* Update snapshot to include canvas events
* Skip all meta events
* Support custom events as best we can in cross origin iframes
* Use earliest version of puppeteer that works with cross origin live-stream
* Map mouse/touch interaction events
* Update snapshots for correctly mapped click events
* Tweak tests for new puppeteer version
* Map MediaInteraction correctly for cross origin iframes
* Make tests consistent between high and low dpi devices
* Make test less flaky
* Make test less flaky
* Make test less flaky
* Make test less flaky
* Add support for styles in cross origin iframes
* Map traditional stylesheet mutations on cross origin iframes
* Add todo
* Add iframe mirror
* Get iframe manager to use iframe mirrors internally
* Rename `IframeMirror` to `CrossOriginIframeMirror`
* Setup basic cross origin canvas webrtc streaming
* Clean up removed canvas elements
* reset style mirror on new full snapshot
* Fix cross origin canvas webrtc streaming
* Make emit optional
* Run tests on github actions
* Upload image artifacts from failed tests
* Use newer github actions
* Test: hopefully adding more wait will fix it
* add extra wait
* Fix image snapshot tests
* Make tests run with new puppeteer version
* upgrade eslint-plugin-jest
* Chore: Remove travis ci as ci's running on github actions
* Chore: Support recording cross origin iframe in repl
* Force developers to update the cross origin iframe mapping when adding new events
https://github.com/rrweb-io/rrweb/pull/1035#discussion_r1012516277
* Document cross origin iframe recording
* Docs: cross origin iframes recording methods
* Docs: AI translated, cross origin iframe recording
* rename getParentId to getId
* Migrate to @rrweb/types
* Run on pull request
* doc: improve Chinese doc
* Rename `parentId` to `Id`
Co-authored-by: Mark-Fenng <f18846188605@gmail.com>
In certain cases when scrollLeft is being set, but the value doesn't change. Then scrollTop is also ignored, even if that value was changed.
In this case we use the `scrollTo` api as it doesn't have that issue.
* Chore: Add move most types from rrweb to @rrweb/types package
* Split off type imports
* Split off type import to its own line
* Get vite to generate type definitions
* Apply formatting changes
* noEmit not allowed in tsconfig, moved it to build step
* Align version of @rrweb/types with main rrweb package
Based on @mark-fenng's comments https://github.com/rrweb-io/rrweb/pull/1031/files#r1002298176
* Move up keywords
* `prototype` here does not refer to the correct WebGLRenderingContext when there are multiple being patched - all were referring to the same one meaning that variables weren't being indexed correctly as `canvasVarMap` in serialize-args.ts was only seeing a single context
If you revert the change from `prototype` to `this` from this commit, you'll get the following failure in the new test added in this commit:
@@ -199,11 +199,11 @@
"property": "bindBuffer",
"args": [
34962,
{
"rr_type": "WebGLBuffer",
- "index": 0
+ "index": 1
}
]
},
This is because the 'confound' canvas was populating a single entry in the canvasVarMap so when 'myCanvas' starts populating, there is already an entry (which doesn't exist on the replay side as the 'confound' canvas was never emitted)
* Update packages/rrweb/test/integration.test.ts
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Update packages/rrweb/test/html/canvas-webgl-shader.html
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>