---
title: "world(with:)"
framework: webkit
role: symbol
role_heading: Type Method
path: "webkit/wkcontentworld/world(with:)"
---

# world(with:)

## Declaration

```swift
class func world(with configuration: WKContentWorldConfiguration) -> WKContentWorld
```

## Discussion

Discussion Creates a world with the given WKContentWorldConfiguration Unlike all other worlds, worlds created with this factory method cannot be retrieved later. Clients therefore need to take care to reference them for as long as they are needed.
