Opens a new tab in the window.
- Safari Desktop 5.0+
- Safari Extensions JS
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
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.