2 years ago
#6606
Rambler
Detect href link click in react native webview
<WebView
bounces={false}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
javaScriptEnabled={true}
originWhitelist={['*']}
source={{ uri:"https://www.google.com" }}
mixedContentMode={'never'} // security
startInLoadingState={true} // when starting this component
onMessage={onMessage}
javaScriptEnabledAndroid={true}
/>
I am using the above code in the webview. I want that as we are doing google search get some results. So i that when any user click on any link then i will detect that user click. Only user clicked link not navigation. So can i inject any javascript callback on link click. So that i can perform some task on user click.
Like i want modify user clicked link. Suppose user clicked on 'wikipedia.com' and i want to add some keys in this url and then user will redirect to modified url like this/
wikipedia.com/?user-clicked
javascript
react-native
react-native-webview
0 Answers
Your Answer