<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SafariServices",
  "identifier" : "/documentation/SafariServices/SFSafariWindow",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Safari Services"
    ],
    "preciseIdentifier" : "c:objc(cs)SFSafariWindow"
  },
  "title" : "SFSafariWindow"
}
-->

# SFSafariWindow

A proxy for a Safari window.

```
class SFSafariWindow
```

## Topics

### Working with Tabs

[`getActiveTab(completionHandler:)`](/documentation/SafariServices/SFSafariWindow/getActiveTab(completionHandler:))

Calls the completion handler with the active tab in the target window.

[`openTab(with:makeActiveIfPossible:completionHandler:)`](/documentation/SafariServices/SFSafariWindow/openTab(with:makeActiveIfPossible:completionHandler:))

Opens a tab at the end of the tab bar.

### Getting the Toolbar Item

[`getToolbarItem(completionHandler:)`](/documentation/SafariServices/SFSafariWindow/getToolbarItem(completionHandler:))

Gets the extension’s toolbar item from the target window.

### Instance Methods

[`close()`](/documentation/SafariServices/SFSafariWindow/close())

[`getAllTabs(completionHandler:)`](/documentation/SafariServices/SFSafariWindow/getAllTabs(completionHandler:))



---

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)