Erick Kalugdan Member Licensed User Nov 8, 2016 #1 In B4A there is a method "addJavascriptInterface" so that if I want to call an app Sub from the javascript inside the webview, I just call it from js via B4A.CallSub Does this exist in B4i too? How? Sample code would be greatly appreciated. Thanks in advance!
In B4A there is a method "addJavascriptInterface" so that if I want to call an app Sub from the javascript inside the webview, I just call it from js via B4A.CallSub Does this exist in B4i too? How? Sample code would be greatly appreciated. Thanks in advance!
Erel B4X founder Staff member Licensed User Longtime User Nov 8, 2016 #2 No. However you can use the OverrideUrl event instead. Set window.location.href in your JavaScript and it will cause the OverrideUrl event to be raised. Return True from OverrideUrl. Upvote 0
No. However you can use the OverrideUrl event instead. Set window.location.href in your JavaScript and it will cause the OverrideUrl event to be raised. Return True from OverrideUrl.
tucano2000 Active Member Licensed User Longtime User Sep 22, 2018 #3 Thanks Erel. I made this code by exemplifying. https://www.b4x.com/android/forum/threads/b4i-javascriptinterface.97500/ Upvote 0
Thanks Erel. I made this code by exemplifying. https://www.b4x.com/android/forum/threads/b4i-javascriptinterface.97500/