<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebFrame/init(name:webFrameView:webView:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WebFrame(im)initWithName:webFrameView:webView:"
  },
  "title" : "init(name:webFrameView:webView:)"
}
-->

# init(name:webFrameView:webView:)

Initializes the receiver with a frame name, web frame view, and controlling web view.

```
init!(name: String!, webFrameView view: WebFrameView!, webView: WebView!)
```

## Parameters

`name`

The frame name. Typically a custom name or `nil` (if none is specified). It would be inappropriate to use one of the predefined frame names described in [`findNamed(_:)`](/documentation/WebKit/WebFrame/findNamed(_:)) as they have special meanings.

`view`

The view that displays this web frame—the view associated with the receiver.

`webView`

The parent view that manages the main frame and its children.

## Return Value

An initialized web frame.

## Discussion

Normally, you do not invoke this method directly. `WebView` objects automatically create the main frame and subsequent children when new content is loaded. Send a [`load(_:)`](/documentation/WebKit/WebFrame/load(_:)-47p2s) message to the main frame of a `WebView` to load web content.

This method is the designated initializer for the `WebFrame` class.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)