postaljs / postal.xframe

postal.js add-on providing the ability to federate instances of postal across iframe/window boundaries
Other
36 stars 38 forks source link

Confusion regarding multiple xframes and request.response #28

Open eshtadc opened 8 years ago

eshtadc commented 8 years ago

Hi there - I'm doing some proof of concept work with postal.js, postal.xframe, and postal.request-response. Overall this is amazing stuff and I really love how well structured it is. I'm running into a bit of a mental road-block figuring out how to handle multiple frames responding to the same request. It seems like a Promise.all() type of functionality needs to be used and probably could be in my implementation but I'd love any guidance as to where (pseudo-codeish or conceptually).

For example: index.html sends a request on channel A iframe1 and iframe2 are both listening for requests on channel A. I want index.html to respond when all iframes have responded rather than when the first response is returned.