<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBrowserDelegate/browser(_:shouldEditItem:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSBrowserDelegate(im)browser:shouldEditItem:"
  },
  "title" : "browser(_:shouldEditItem:)"
}
-->

# browser(_:shouldEditItem:)

Asks the delegate whether the browser may start an editing session for the specified item.

```
@MainActor optional func browser(_ browser: NSBrowser, shouldEditItem item: Any?) -> Bool
```

## Parameters

`browser`

The browser.

`item`

The item to edit.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to allow the editing session to begin; <doc://com.apple.documentation/documentation/Swift/false> to disallow it.

## Discussion

---

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)