feat(webview): Allow javascript to open windows automatically (#1409 by @trcoffman)

[skip ci]
This commit is contained in:
trcoffman
2020-05-28 09:54:20 -07:00
committed by GitHub
parent 3cbf1490f4
commit 91df544fae
6 changed files with 29 additions and 0 deletions
@@ -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);