jampy commented on issue #777:
URL:
https://github.com/apache/cordova-plugin-inappbrowser/issues/777#issuecomment-1413916476
for clarification: `postMessage()` appears to expect a String that's valid
JSON.
```javascript
// This will work:
webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({one:1,two:2})):
// This also works:
webkit.messageHandlers.cordova_iab.postMessage('{"valid":"JSON"}');
// But this does NOT work:
webkit.messageHandlers.cordova_iab.postMessage('bla');
```
The `message` handler received the parsed JSON object, not a string:
```javascript
iabRef.addEventListener('message', event => {
console.log(event.data); // logs an object, not a string
});
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]