<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebFrameLoadDelegate/webView(_:didChangeLocationWithinPageFor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebFrameLoadDelegate(im)webView:didChangeLocationWithinPageForFrame:"
  },
  "title" : "webView(_:didChangeLocationWithinPageFor:)"
}
-->

# webView(_:didChangeLocationWithinPageFor:)

Called when the scroll position within a frame changes.

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

## Parameters

`sender`

The web view containing the frame.

`frame`

The frame being loaded.

## 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`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)