question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MIGRATED: Webview is not executing my JavaScript from the web page on Android? (#14754)

See original GitHub issue

MIgrated from https://github.com/facebook/react-native/issues/14754

@andrisole92 says:


Description When I open WebView on Android emulator or real device it does not execute JavaScript. I have run simple Android App in Android Studio and it worked there.

Reproduction Steps Just create a new app and add this WebView to it

Sample Code

<WebView
  style={[styles.flex]} //styles
  javaScriptEnabled={true} //enabling JavaScript
  source={{uri: 'http://partners.zeew.eu/'}} //Url
/>

Solution Can you please check it and say what is wrong?

Additional Information React Native version: 0.45.1 Platform: Android ( not sure about iOS ) Development Operating System: Windows Build tools: Android Studio: Nexus 5x edited_api_25 Android 6.0 Google APIs, Nexus 5 API level 26, Android 8.0.0


More info on the original issue thread

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
jamonholmgrencommented, Nov 19, 2018

I tried to replicate this and can’t, seems that JavaScript is working fine.

Loading this: https://www.whatismybrowser.com/detect/is-javascript-enabled

image

1reaction
ZeeshanAhmadKhalilcommented, Dec 1, 2019

I am having the same issue and i have only 2 days in my Final Year Project internal presentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webview is not executing my JavaScript from the web page on ...
This issue only comes on old Android devices, It does support ES6 script(It makes sense right). To work on it just go to...
Read more >
JavaScript not working in Android Webview? - Stack Overflow
But I'm stuck at a pretty early point of development: The webview doesn't function with javascript.I've read a lot of posts about how...
Read more >
Build web apps in WebView - Android Developers
If the web page you plan to load in your WebView uses JavaScript, you must enable JavaScript for your WebView . Once JavaScript...
Read more >
react-native-autoheight-webview - npm
Cause of javascript execution in webview is not working for Android API version 21 and below (https://github.com/facebook/react-native/issues/ ...
Read more >
499331 - Android System WebView No Longer Opens Links in ...
You can see this in action by running any Android app that has a WebView and either has not set a WebViewClient (which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found