I have two prototype iframes integrated into my application. Both are sending events to the parent window using postMessage
. However, I am struggling to identify which iframe (or prototype) is the source of a specific event because the messages only contain information like node-id
and event type.
The issue is that event.source
points to the iframe
, but since the iframes are cross-origin, I can’t reliably distinguish which one is sending the message.
How can I determine the source of these messages? Ideally, I’d like to map each message to its corresponding iframe or prototype. Any suggestions or best practices for handling this kind of situation?