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:

  1. window.parent.window.android.close() within iframe.
  2. stored window.androidclose = android.close in variable inside index.html , called within iframe window.parent.window.androidclose().
  3. tried postmessage api message passing between iframe , index.html sending message , calling inside callback window.addeventlistener('message', function() { android.close(); }, false);


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

Redirect to a HTTPS version using .htaccess -