---
title: "getAllTabs(completionHandler:)"
framework: safariservices
role: symbol
role_heading: Instance Method
path: "safariservices/sfsafariwindow/getalltabs(completionhandler:)"
---

# getAllTabs(completionHandler:)

## Declaration

```swift
func getAllTabs(completionHandler: @escaping @Sendable ([SFSafariTab]) -> Void)
```

```swift
func allTabs() async -> [SFSafariTab]
```

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func allTabs() async -> [SFSafariTab] For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Instance Methods

- [close()](safariservices/sfsafariwindow/close().md)
