rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

rrweb cannot get the correct document object in the js sandbox

Open HappyPot opened this issue 1 year ago • 3 comments

I use a micro-front-end framework wujie, which generates an iframe to carry the js part and act as a js sandbox. Any content in the body tag of this iframe is placed in the shadow dom. As a result, rrweb cannot get the correct doucment object and thus cannot record the screen. How to solve this problem, thank you

HappyPot avatar Apr 16 '25 13:04 HappyPot

@HappyPot which version are you using? have you tried 2.0.0-alpha.18

wfk007 avatar Nov 21 '25 11:11 wfk007

@wfk007 I'm glad to hear that. I'm using version 2.0.0-alpha.4 right now, and I plan to give the version you mentioned a try

HappyPot avatar Nov 25 '25 08:11 HappyPot

@wfk007 I'm glad to hear that. I'm using version 2.0.0-alpha.4 right now, and I plan to give the version you mentioned a try

If I'm not mistaken, version 2.0.0-alpha.18 will not work either. I wrote a demo https://github.com/wfk007/rrweb-wujie to reproduce and opened a pr to fix it.

wfk007 avatar Nov 25 '25 11:11 wfk007