Added response parameter to postMessage data

no issue

- The 'response' property is needed to make the receiving client generic in regards of what data format has to be returned as a result of the call. For example with this change the 'response: subscription' meant there should be an incoming 'message' event as a response to this call with 'subscription' key into it's data
This commit is contained in:
Nazar Gargol 2020-05-01 17:34:55 +12:00
parent 0ec853299e
commit 14122fdb39

View File

@ -33,7 +33,8 @@ export default Component.extend({
if (!fetchingSubscription && !this.get('subscription')) {
fetchingSubscription = true;
iframe.contentWindow.postMessage({
query: 'getSubscription'
query: 'getSubscription',
response: 'subscription'
}, '*');
}
}