---
title: WKContentWorldConfiguration
framework: webkit
role: symbol
role_heading: Class
path: webkit/wkcontentworldconfiguration
---

# WKContentWorldConfiguration

## Declaration

```swift
@MainActor class WKContentWorldConfiguration
```

## Overview

Overview A WKContentWorldConfiguration object allows you to specify custom behavior for a WKContentWorld instance. WKContentWorldConfiguration allows applications to create WKContentWorld instances which have extra JavaScript capabilities exposed to script in their environment. It does not change any default WebKit behaviors, nor change anything that web page JavaScript can do. Only application JavaScript run in the created WKContentWorld will have different capabilities. For example: If your scripts help provide autofill capabilities, you would want to set autofillEnabled to YES.

## Topics

### Initializers

- [init(coder:)](webkit/wkcontentworldconfiguration/init(coder:).md)

### Instance Properties

- [autofillScriptingEnabled](webkit/wkcontentworldconfiguration/autofillscriptingenabled.md)
- [elementUserInfoEnabled](webkit/wkcontentworldconfiguration/elementuserinfoenabled.md)
- [isInspectable](webkit/wkcontentworldconfiguration/isinspectable.md)
- [jsHandleCreationEnabled](webkit/wkcontentworldconfiguration/jshandlecreationenabled.md)
- [legacyBuiltinOverridesEnabled](webkit/wkcontentworldconfiguration/legacybuiltinoverridesenabled.md)
- [nodeSerializationEnabled](webkit/wkcontentworldconfiguration/nodeserializationenabled.md)
- [openClosedShadowRootsEnabled](webkit/wkcontentworldconfiguration/openclosedshadowrootsenabled.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
