<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebOpenPanelResultListener",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebOpenPanelResultListener"
  },
  "title" : "WebOpenPanelResultListener"
}
-->

# WebOpenPanelResultListener

`WebView` user interface delegates that implement the webView:runOpenPanelForFileButtonWithResultListener: method use the methods defined in this protocol to communicate with the listener object. The methods allow the delegate to send a cancel message, or set the selected file name.

```
protocol WebOpenPanelResultListener : NSObjectProtocol
```

## Topics

### Setting a File Name

[`chooseFilename(_:)`](/documentation/WebKit/WebOpenPanelResultListener/chooseFilename(_:))

Displays a file open panel and returns the selected filename.

[`chooseFilenames(_:)`](/documentation/WebKit/WebOpenPanelResultListener/chooseFilenames(_:))

Displays a file open panel and returns the multiple selected filenames.

### Cancelling a File Open Operation

[`cancel()`](/documentation/WebKit/WebOpenPanelResultListener/cancel())

Invoked when a file open operation was cancelled.



---

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)