fix(widget): replay cached messages without MessageEvent#7440
fix(widget): replay cached messages without MessageEvent#7440shoom3301 wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
||
| if (!method) { | ||
| return | ||
| if (event.origin !== trustedOrigin) return |
There was a problem hiding this comment.
Important! Since we bypass IframeTransport for the cached messages, we validate the event here as well.
Summary
Fixes #7428
It turned out that some browsers (Firefox) do not support creating MessageEvent with
source:Because of that I changed the messages caching mechanism and do a direct handler call isntead of replaying the events on window.
To Test