Answers for "Inject Javascript Function not working in Android React Native WebView but work fine in iOS React Native"

1

Inject Javascript Function not working in Android React Native WebView but work fine in iOS React Native

For android, while adding the javascript function we need to add it as part of DOM. For that, replace `function` with `document` in jsCode.  
Ex:
let jsCode = `docuement.doPopUp() {
                        document.querySelector('#myBody').style.backgroundColor = 'red';
                        alert('hello world from webview');
                        }`;
Posted by: Guest on April-14-2021

Code answers related to "Inject Javascript Function not working in Android React Native WebView but work fine in iOS React Native"

Code answers related to "Javascript"

Browse Popular Code Answers by Language