---
title: "webView(_:willPerform:from:with:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webuidelegate/webview(_:willperform:from:with:)"
---

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

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

## Declaration

```swift
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 doc://com.apple.webkit/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

Discussion This method is invoked after the last invocation of the 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.

## See Also

### Controlling Drag Behavior

- [webView(_:dragDestinationActionMaskFor:)](webkit/webuidelegate/webview(_:dragdestinationactionmaskfor:).md)
- [webView(_:dragSourceActionMaskFor:)](webkit/webuidelegate/webview(_:dragsourceactionmaskfor:).md)
- [webView(_:willPerform:for:)](webkit/webuidelegate/webview(_:willperform:for:).md)
