Instance Method

openTab

Opens a new tab in the window.

Declaration

SafariBrowserTab openTab(in DOMString visibility, in unsigned long index);

Parameters

visibility

Either foreground if the tab should be opened in the foreground, or background if it should be opened in the background. Optional.

index

The desired location of the new tab. Optional.

Return Value

A new tab.

Discussion

The default visibility is foreground, used when visibility is 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 index is negative, the tab is inserted at the far left; if index is greater than the number of tabs currently open, the tab is inserted at the far right.

See Also

Interacting with Windows

activate

Brings the window to the front and gives it keyboard focus.

activeTab

The tab currently being displayed in the window.

close

Requests that the window should close.

insertTab

Inserts a tab into the window.