-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi!
I ran into an issue with multiple iframes from different domains communicating with the main window. I cannot create listeners on the main window from the iframes' contexts because of cross-domain restrictions.
The way this was handled before using postmsg-rpc, was by dispatching an event on the window we got the original message from:
window.addEventListener('message', (event) => {
// ...
event.source.postMessage(msg, '*')
});
Would it be possible to add this as an option to postmsg-rpc? Something like opts.replyToSender Happy to submit a PR!
Metadata
Metadata
Assignees
Labels
No labels