<!--
{
  "availability" : [
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/isSelectorExcluded(fromWebScript:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(cm)isSelectorExcludedFromWebScript:"
  },
  "title" : "isSelectorExcluded(fromWebScript:)"
}
-->

# isSelectorExcluded(fromWebScript:)

Returns whether a selector should be hidden from the scripting environment.

```
class func isSelectorExcluded(fromWebScript selector: Selector!) -> Bool
```

## Parameters

`selector`

The selector.

## Return Value

[`YES`](/documentation/ObjectiveC/YES) if the selector specified by `aSelector` should be hidden from the scripting environment; otherwise, [`NO`](/documentation/ObjectiveC/NO).

## Discussion

Only methods with valid parameters and return types are exported to the WebKit JavaScript environment. The valid types are Objective-C objects and scalars. The default value is [`YES`](/documentation/ObjectiveC/YES).

---

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)