SafariApplication Class Reference

Inherits from
Technology area
Safari Extensions
Availability
Available in Safari 5.0 and later.

Overview

The SafariApplication class allows a Safari extension to interact with the Safari application.

Tasks

Creating Browser Windows

Accessing Browser Windows

Accessing Private Browsing

Properties

activeBrowserWindow

The active browser window.

readonly attribute SafariBrowserWindow activeBrowserWindow
Discussion

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

Availability

browserWindows

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

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

privateBrowsing

An object representing Safari's Private Browsing feature.

readonly attribute SafariPrivateBrowsing privateBrowsing;
See Also

Methods

openBrowserWindow

Opens a new browser window in front of all other windows.

SafariBrowserWindow openBrowserWindow (void);
Return Value

The newly opened window.

Availability
  • Available in Safari 5.0 and later.