mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
feat(webview): Allow javascript to open windows automatically (#1409 by @trcoffman)
[skip ci]
This commit is contained in:
@@ -376,6 +376,11 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
||||
view.getSettings().setMediaPlaybackRequiresUserGesture(requires);
|
||||
}
|
||||
|
||||
@ReactProp(name = "javaScriptCanOpenWindowsAutomatically")
|
||||
public void setJavaScriptCanOpenWindowsAutomatically(WebView view, boolean enabled) {
|
||||
view.getSettings().setJavaScriptCanOpenWindowsAutomatically(enabled);
|
||||
}
|
||||
|
||||
@ReactProp(name = "allowFileAccessFromFileURLs")
|
||||
public void setAllowFileAccessFromFileURLs(WebView view, boolean allow) {
|
||||
view.getSettings().setAllowFileAccessFromFileURLs(allow);
|
||||
|
||||
Reference in New Issue
Block a user