<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BEScrollViewDelegate/parentScrollView(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(pl)BEScrollViewDelegate(im)parentScrollViewForScrollView:"
  },
  "title" : "parentScrollView(for:)"
}
-->

# parentScrollView(for:)

Returns the scroll view that acts as the DOM container of the given scroll view.

```
optional func parentScrollView(for scrollView: BEScrollView) -> BEScrollView?
```

## Parameters

`scrollView`

The scroll view for which to return the logically containing scroll view.

## Return Value

The scroll view that is the logical DOM container of the provided scroll view. Return `nil` to get the default behavior, where the system recursively searches the scroll view’s <doc://com.apple.documentation/documentation/UIKit/UIView/superview> hierarchy for a containing scroll view.

## Discussion

To correctly render some websites, you may need to create [`BEScrollView`](/documentation/BrowserEngineKit/BEScrollView) objects that are siblings in the view hierarchy but nested in the DOM. In these situations, implement this method in the delegate of the logically contained scroll view, and return the logically containing scroll view. The containing scroll view must appear visually beneath the contained scroll view.

---

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)