Skip to content

Conversation

@samber
Copy link
Contributor

@samber samber commented Oct 15, 2022

First, thanks for this awesome project 👏

Currently, rrweb does not allow recording a user session from an iframe. This is a bit annoying for those who run rrweb in a third-party tool injected as a Javascript tag.

I would like to suggest a different implementation of #294.

#294 offers to look up the top Window object on the current page. This is a good start, but I would rather let the developer choose what Window HTML Element is the best: window or window.top or window.parent or window.parent.parent.[...] or document.querySelector('iframe').contentWindow...

PS: can anybody translate the doc to Chinese? 🙏

@samber
Copy link
Contributor Author

samber commented Oct 15, 2022

Can be tested with stream.js script, with window: document.querySelector('#iframeResult').contentWindow added line 50.

Tested with the following page: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe

@samber samber force-pushed the feat-custom-window branch from a1313c0 to c1b24e0 Compare October 15, 2022 16:50
@eoghanmurray
Copy link
Contributor

OK I think building this on top of #294 is the way forward, however gonna query the core team for the best approach i.e. whether it's better not to assume that all users want the topmost window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants