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

# webView(_:willPerform:for:)

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

## Declaration

```swift
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 doc://com.apple.webkit/documentation/WebKit/WebDragDestinationAction for a list of actions.
- `draggingInfo`: The information object for the dragging operation.

## Discussion

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

## See Also

### Controlling Drag Behavior

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