---
title: allowsContentJavaScript
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/wkwebpagepreferences/allowscontentjavascript
---

# allowsContentJavaScript

A Boolean value that indicates whether JavaScript from web content is allowed to run.

## Declaration

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

## Discussion

Discussion The default value of this property is true. If you change the value to false, the web view doesn’t execute JavaScript code referenced by the web content. That includes JavaScript code found in inline <script> elements, javascript: URLs, and all other referenced JavaScript content.
