---
title: WKContentWorld.Configuration
framework: WebKit
role: symbol
role_heading: Class
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, visionOS 27.0+]
path: webkit/wkcontentworld/configuration
---

# WKContentWorld.Configuration

## Declaration

```swift
@MainActor class Configuration
```

## 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/wkcontentworld/configuration/init(coder:).md)

### Instance Properties

- [allowAccessingClosedShadowRoots](webkit/wkcontentworld/configuration/allowaccessingclosedshadowroots.md)
- [autofillScriptingEnabled](webkit/wkcontentworld/configuration/autofillscriptingenabled.md)
- [elementUserInfoEnabled](webkit/wkcontentworld/configuration/elementuserinfoenabled.md)
- [isInspectable](webkit/wkcontentworld/configuration/isinspectable.md)
- [jsHandleCreationEnabled](webkit/wkcontentworld/configuration/jshandlecreationenabled.md)
- [legacyBuiltinOverridesEnabled](webkit/wkcontentworld/configuration/legacybuiltinoverridesenabled.md)
- [nodeSnapshotCreationEnabled](webkit/wkcontentworld/configuration/nodesnapshotcreationenabled.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)

## See Also

### Page content

- [WKUserContentController](webkit/wkusercontentcontroller.md)
- [WKContentRuleListStore](webkit/wkcontentruleliststore.md)
- [WKContentWorld](webkit/wkcontentworld.md)
- [WKFrameInfo](webkit/wkframeinfo.md)
- [WKSecurityOrigin](webkit/wksecurityorigin.md)
- [WKUserScript](webkit/wkuserscript.md)
- [WKJSHandle](webkit/wkjshandle.md)
