Instances of the
SafariBrowserWindow class represent browser windows. Each window contains one or more tabs, which display web content.
The tabs in the window.
readonly attribute array tabs
The tabs are ordered in the array from left to right.
A Boolean value that indicates whether the window is visible.
readonly attribute boolean visible
This attribute is
trueif the window is being displayed, even if it is covered by other windows. It is
falseif the window has been minimized.
Brings the window to the front and gives it keyboard focus.
void activate ();
The tab currently being displayed in the window.
readonly attribute SafariBrowserTab activeTab
Requests that the window should close.
void close ();
This method has the same behavior as clicking a window’s close button—clicking does not necessarily cause the window to close. After a window closes, the value of all of its properties is
undefinedand all of its prototype’s methods return
Opens a new tab in the window.
SafariBrowserTab openTab (in DOMString
visibility, in unsigned long
foregroundif the tab should be opened in the foreground, or
backgroundif it should be opened in the background. Optional.
The desired location of the new tab. Optional.
A new tab.
The default visibility is
foreground, used when
visibilityis omitted or undefined. An invalid value causes an exception.
Tab indexes start at 0 on the far left and increases going to the right. The default location is at the far right. If
indexis negative, the tab is inserted at the far left; if
indexis greater than the number of tabs currently open, the tab is inserted at the far right.
Inserts a tab into the window.
void insertTab (in SafariBrowserTab
tab, in unsigned long
The tab being inserted.
The location where the tab is being inserted.