---
title: WKJSScriptingBuffer
framework: webkit
role: symbol
role_heading: Class
path: webkit/wkjsscriptingbuffer
---

# WKJSScriptingBuffer

A WKJSScriptingBuffer object exposes an application controlled data buffer to JavaScript.

## Declaration

```swift
class WKJSScriptingBuffer
```

## Overview

Overview JavaScript has access to various WebKit extensions via the window.webkit object. One such feature is window.webkit.buffers which provides access to named data buffers that can be provided by the WebKit application. To provide a data buffer to JavaScript the application first creates a WKJSScriptingBuffer object. It then adds it to the appropriate WKUserContentController with an application provided name. For example, if the application creates a WKJSScriptingBuffer and adds it to a web view’s WKUserContentController with the name "mybuffer", then JavaScript can access it by referencing window.webkit.buffers.mybuffer

## Topics

### Initializers

- [init(data:)](webkit/wkjsscriptingbuffer/init(data:).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)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
