<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebUIDelegate/webView(_:willPerform:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebUIDelegate(im)webView:willPerformDragDestinationAction:forDraggingInfo:"
  },
  "title" : "webView(_:willPerform:for:)"
}
-->

# webView(_:willPerform:for:)

Tells the receiver that the sending web view will perform the specified drag-destination action.

```
optional func webView(_ webView: WebView!, willPerform action: WebDragDestinationAction, for draggingInfo: (any NSDraggingInfo)!)
```

## Parameters

`webView`

The web view that sent the message.

`action`

The drag-destination action to perform. See [`WebDragDestinationAction`](/documentation/WebKit/WebDragDestinationAction) for a list of actions.

`draggingInfo`

The information object for the dragging operation.

## Discussion

This method is invoked after the last invocation of the [`webView(_:dragDestinationActionMaskFor:)`](/documentation/WebKit/WebUIDelegate/webView(_:dragDestinationActionMaskFor:)) method, when the dragged content is dropped and the sender is about to perform the destination action. No action is taken if you do not implement this method.

---

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)