<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSScriptObjectSpecifier/containerIsObjectBeingTested",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScriptObjectSpecifier(py)containerIsObjectBeingTested"
  },
  "title" : "containerIsObjectBeingTested"
}
-->

# containerIsObjectBeingTested

Sets whether the receiver’s container should be an object involved in a filter reference or the top-level object.

```
var containerIsObjectBeingTested: Bool { get set }
```

## Discussion

If the receiver’s container specifier is `nil` and `flag` is <doc://com.apple.documentation/documentation/Swift/true>, sets the receiver’s container to be an object involved in a filter reference (for example, `whose color is blue`). If the receiver’s container specifier is `nil` and `flag` is <doc://com.apple.documentation/documentation/Swift/false>, sets the receiver’s container to be the top-level object.

If `flag` is <doc://com.apple.documentation/documentation/Swift/true> [`containerIsRangeContainerObject`](/documentation/Foundation/NSScriptObjectSpecifier/containerIsRangeContainerObject) should not also be invoked with an argument of <doc://com.apple.documentation/documentation/Swift/true>.

---

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)