Safari Developer Library

Developer

SafariApplication Class Reference

Options
Deployment Target:

On This Page

SafariApplication

The SafariApplication class allows a Safari extension to interact with the application's SafariBrowserWindow and SafariBrowserTab objects.

  • The active browser window.

    Declaration

    readonly attribute SafariBrowserWindow activeBrowserWindow

    Discussion

    If there are no open browser windows, the value of this attribute is null.

  • The current browser windows, in order from front to back.

    Declaration

    readonly attribute array browserWindows

    Discussion

    If there are no browser windows, the array is empty.

    Using activeBrowserWindow is more efficient if you only want the frontmost window.