[Feature Request] Add more properties and functions to the Webview component

Hi @Harri_Sarsa, it will be great you can add more properties and functions to the Webview.
Particularly I’m interested in the injectJavaScript.
This is a very powerful property because it allows you full control over the content of a page when viewed in a webview. I’ve used this before on another platform to remove the elements from a page when viewing the page in a webview.
Here is an example. When using Stripe Checkout, there is a back button that a user can press to return to the payment page. If you’re using a webview you wouldn’t want this element to appear. With the injectJavaScript property you can easily write javascript code that removes this element (by finding its element Id or class using developer tools).

Also one of the main issues with webviews is that on android where there is a back button, users normally think clicking the back button will navigate them back on the webview. But this will rather go back in the app and therefore close the webview page. This restricts what can be achieved with webview.
A solution is will be to goBack function of the webview. Then also add action that allows us to detect when the back button on the device is pressed so that modify the behavior of the default back button.


I believe AppGyver is based on React, and the React Native Webview element has this, so I don’t believe it should be too hard for them to implement (unless I’m totally wrong about AppGyver being built on React)

1 Like

Big ditto on this thread

1 Like

Yes, PLEASE add inject javascript and/or any method of communicating to javascript inside the WebView.

Does anyone know if this was implemented?
This feature is excellent, we need it.