Contents

webViewContextMenu(menu:)

Adds an item-based context menu to a WebView, replacing the default set of context menu items.

Declaration

nonisolated func webViewContextMenu(@ViewBuilder menu: @escaping @MainActor @Sendable (WebView.ActivatedElementInfo) -> some View) -> some View

Parameters

  • menu:

    A closure that produces the menu. The single parameter to the closure describes the type of webpage element that was acted upon.

Return Value

A view that can display an item-based context menu.

See Also

Displaying web content