---
title: "add(_:name:contentWorld:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkusercontentcontroller/add(_:name:contentworld:)"
---

# add(_:name:contentWorld:)

## Declaration

```swift
func add(_ buffer: WKJSScriptingBuffer, name: String, contentWorld world: WKContentWorld)
```

## Parameters

- `buffer`: The buffer to add.
- `name`: The name of the buffer to be referenced from JavaScript. e.g. with a name parameter of @"mybuffer", JavaScript can reference the buffer via window.webkit.buffers.mybuffer

## Discussion

Discussion Adds a data buffer that will be available to JavaScript through the window.webkit.buffers object
