react-native-webview2 icon indicating copy to clipboard operation
react-native-webview2 copied to clipboard

evalJs NOT WORK on ios

Open erikdung opened this issue 9 years ago • 6 comments
trafficstars

Hi, I tried to use this.web.evalJs() function, but it doesn't work. The javascript served in function argument didn't fire at all. I tried this.web.evalJs('alert('Hello')'), but got redirect error. Do I something wrong?

erikdung avatar Sep 14 '16 10:09 erikdung

android or ios ? react-native-webview2 cannot work well on ios now, maybe fix next week.

greatbsky avatar Sep 14 '16 10:09 greatbsky

iOS :( Let me now when you will fix it 👍

erikdung avatar Sep 14 '16 10:09 erikdung

Any progress here?

erikdung avatar Sep 20 '16 13:09 erikdung

sorry for waiting, I will think about this bug in this week, I am very busy these days...

greatbsky avatar Sep 22 '16 04:09 greatbsky

sorry, this method still not support on ios until now. I didn't find a very good way to resolve this. one method is set the props: injectedJavaScript. but not very good, it must be refreshed. @erikdung

greatbsky avatar Sep 25 '16 08:09 greatbsky

@greatbsky have you checked react-native-webview-bridge, specifically the v2 branch? It allows for two-way communication with WebView <-> React Native.

tioback avatar Oct 18 '16 11:10 tioback