I'm tracking down a hard-to-replicate bug related to messages between frames. One thing I'm mildly suspicious of is that messages between the main frame and an iframe are sometimes not being sent successfully. I.e. messages are possibly being "dropped" in rare cases.
Question:
Is there any spec-level guarantee that a message sent with postMessage will be received by the target frames, assuming there's no bugs in my code?
For example, if the recipient frame happens to be unresponsive (e.g. due to a long computation which freezes the main thread) at the time that it would have received the message event, could that cause the message event to be lost? Or would is it guaranteed to be "queued" and eventually received by the window once the main thread is freed up.
Notes:
* I'd prefer answers which reference specifications, since this would allow me to file bug reports on browser engines if needed.
* I've noticed that if I have the debugger paused in the recipient frame, then all messages are lost. After unpausing, the messages are never received.
* If there are no spec-level guarantees in this area, I'm also interested in any info on browser-engine-specific behavior, if anyone has any info on that.
0 comments:
Post a Comment
Thanks