How to trigger Android function in Javascript from within iframe in webview? -
i've android.close method being exposed jsbinding can called javascript in webview close it. however, i've iframe loads sample page inside index.html, webview renders. calling same method within iframe not trigger close webview.
what's solution?
i've tried following ways no luck:
window.parent.window.android.close()within iframe.- stored
window.androidclose = android.closein variable insideindex.html, called within iframewindow.parent.window.androidclose(). - tried
postmessageapi message passing between iframe ,index.htmlsending message , calling inside callbackwindow.addeventlistener('message', function() { android.close(); }, false);
Comments
Post a Comment