---
title: "webViewScrollPosition(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/webviewscrollposition(_:)"
---

# webViewScrollPosition(_:)

Associates a binding to a scroll position with the web view.

## Declaration

```swift
nonisolated func webViewScrollPosition(_ position: Binding<ScrollPosition>) -> some View

```

## Discussion

Discussion note: WebView does not support scrolling to a view with an identity. It only supports scrolling to a concrete offset, or to an edge.

## See Also

### Displaying web content

- [WebView](webkit/webview-swift.struct.md)
- [WebPage](webkit/webpage.md)
- [onWebViewImmersiveEnvironmentRequest(shouldAllow:present:dismiss:)](swiftui/view/onwebviewimmersiveenvironmentrequest(shouldallow:present:dismiss:).md)
- [webViewBackForwardNavigationGestures(_:)](swiftui/view/webviewbackforwardnavigationgestures(_:).md)
- [webViewContentBackground(_:)](swiftui/view/webviewcontentbackground(_:).md)
- [webViewContextMenu(menu:)](swiftui/view/webviewcontextmenu(menu:).md)
- [webViewElementFullscreenBehavior(_:)](swiftui/view/webviewelementfullscreenbehavior(_:).md)
- [webViewLinkPreviews(_:)](swiftui/view/webviewlinkpreviews(_:).md)
- [webViewMagnificationGestures(_:)](swiftui/view/webviewmagnificationgestures(_:).md)
- [webViewOnScrollGeometryChange(for:of:action:)](swiftui/view/webviewonscrollgeometrychange(for:of:action:).md)
- [webViewScrollInputBehavior(_:for:)](swiftui/view/webviewscrollinputbehavior(_:for:).md)
- [webViewTextSelection(_:)](swiftui/view/webviewtextselection(_:).md)
