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

# webView(_:willPerform:from:with:)

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

```
optional func webView(_ webView: WebView!, willPerform action: WebDragSourceAction, from point: NSPoint, with pasteboard: NSPasteboard!)
```

## Parameters

`webView`

The web view that sent the message.

`action`

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

`point`

The point at which the drag began, specified in the coordinates of the web view.

`pasteboard`

The drag pasteboard.

## Discussion

This method is invoked after the last invocation of the [`webView(_:dragSourceActionMaskFor:)`](/documentation/WebKit/WebUIDelegate/webView(_:dragSourceActionMaskFor:)) method, when the dragged content is dropped and the sender is about to perform the drag-source action. The delegate has the opportunity to modify the contents of the object on the pasteboard before completing the drag-source 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)