---
title: "webView(_:didChangeLocationWithinPageFor:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webframeloaddelegate/webview(_:didchangelocationwithinpagefor:)"
---

# webView(_:didChangeLocationWithinPageFor:)

Called when the scroll position within a frame changes.

## Declaration

```swift
optional func webView(_ sender: WebView!, didChangeLocationWithinPageFor frame: WebFrame!)
```

## Parameters

- `sender`: The web view containing the frame.
- `frame`: The frame being loaded.

## Discussion

Discussion Typically invoked when the user clicks on an anchor within a page. Additional information about the request can be obtained from the data source of frame.
