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

# allowsContentJavaScript

Indicates whether JavaScript from web content is allowed to run.

## Declaration

```swift
var allowsContentJavaScript: Bool
```

## Discussion

Discussion The default value of this property is true. If you change the value to false, the web page 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.
