You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/09/05 09:24:02 UTC

[GitHub] [cordova-plugin-inappbrowser] dpa99c commented on issue #529: postMessage on Android requires that message string is wrapped with {}

dpa99c commented on issue #529: postMessage on Android requires that message string is wrapped with {}
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/529#issuecomment-528279569
 
 
   The Android implementation is an exact emulation of the native implementation of `postMessage()` in WKWebView on iOS
    i.e. `webkit.messageHandlers.cordova_iab.postMessage()` calls the native WKWebView implementation of that function.
   If you pass anything other than a stringified JSON object to `postMessage()` in WKWebView, it will fail silently (no errors in native or JS consoles).
   
   To make Android behaviour differently, e.g. make any string valid as a `postMessage()` argument, would cause cross-platform confusion as it would work on Android but fail silently in WKWebView on iOS.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org