After new a postmate, I re-set the 'src' for iframe and call 'call' to send message to child.
But the event listener monitor the 'load' event, so it trigger the 'loaded' and try to send handshake. By the time, in child page, due to the reload, it re-call the new Postmate.Model, and run sendHandshakeReply, but the data.postmate it received is not 'handshake' but 'call', so the hand shake reply fail.
Provide issue context below using code examples, images, or links
Read about references issues here. Provide paragraph text responses to each header.
What Is the issue?
After new a postmate, I re-set the 'src' for iframe and call 'call' to send message to child. But the event listener monitor the 'load' event, so it trigger the 'loaded' and try to send handshake. By the time, in child page, due to the reload, it re-call the new Postmate.Model, and run sendHandshakeReply, but the data.postmate it received is not 'handshake' but 'call', so the hand shake reply fail.
Provide issue context below using code examples, images, or links