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 Safari application.

Inheritance


Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Availability


Available in Safari 5.0 and later.
  • Opens a new browser window in front of all other windows.

    Declaration

    JavaScript

    SafariBrowserWindow openBrowserWindow ();

    Return Value

    The newly opened window.

    Availability

    Available in Safari 5.0 and later.

  • The active browser window.

    Declaration

    JavaScript

    readonly attribute SafariBrowserWindow activeBrowserWindow

    Discussion

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

    Availability

    Available in Safari 5.0 and later.

  • browserWindows Property

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

    Declaration

    JavaScript

    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.

    Availability

    Available in Safari 5.0 and later.

  • privateBrowsing Property

    An object representing Safari's Private Browsing feature.

    Declaration

    JavaScript

    readonly attribute SafariPrivateBrowsing privateBrowsing;