---
title: javaScriptCanOpenWindowsAutomatically
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/webpreferences/javascriptcanopenwindowsautomatically
---

# javaScriptCanOpenWindowsAutomatically

A Boolean that indicates whether or not the web view allows JavaScript to open windows automatically.

## Declaration

```swift
var javaScriptCanOpenWindowsAutomatically: Bool { get set }
```

## Discussion

Discussion Set to true if the web view should allow JavaScript to open windows automatically, otherwise false. Explicit calls to a JavaScript window opener that are activated by user action (such as a button click) are not affected by this setting.

## See Also

### Enabling JavaScript

- [isJavaScriptEnabled](webkit/webpreferences/isjavascriptenabled.md)
