---
title: "webView(_:contextMenuDidEndForElement:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkuidelegate/webview(_:contextmenudidendforelement:)"
---

# webView(_:contextMenuDidEndForElement:)

Tells the delegate that the web view dismissed the contextual menu for the specified element.

## Declaration

```swift
optional func webView(_ webView: WKWebView, contextMenuDidEndForElement elementInfo: WKContextMenuElementInfo)
```

## Parameters

- `webView`: The web view in which the interaction occurred.
- `elementInfo`: An object that contains information about the element involved in the interaction.

## See Also

### Displaying a contextual menu

- [Adding context menus in your app](uikit/adding-context-menus-in-your-app.md)
- [webView(_:contextMenuConfigurationForElement:completionHandler:)](webkit/wkuidelegate/webview(_:contextmenuconfigurationforelement:completionhandler:).md)
- [webView(_:contextMenuForElement:willCommitWithAnimator:)](webkit/wkuidelegate/webview(_:contextmenuforelement:willcommitwithanimator:).md)
- [webView(_:contextMenuWillPresentForElement:)](webkit/wkuidelegate/webview(_:contextmenuwillpresentforelement:).md)
- [UIContextMenuConfiguration](uikit/uicontextmenuconfiguration.md)
