Inherits from | |
Technology area | Safari Extensions |
Availability | Available in Safari 5.0 and later. |
Instances of the SafariExtensionBar
class represent a bar that your extension provides. An extension can add any number of bars to Safari. Adding bars is optional.
Safari creates a separate instance of the bars from your extensions for every window. Thus, if the user opens multiple Safari windows, there are multiple SafariExtensionBar
objects representing the same bar — one in each window. Also, if the user doesn’t have any Safari windows open, there are no SafariExtensionBar
objects.
To access the array of all bars added by your extension, use the SafariExtension
method bars
.
The browser window containing the bar.
readonly attribute SafariBrowserWindow browserWindow
The DOM window object of the bar.
readonly attribute DOMWindow contentWindow
The unique identifier of the bar.
readonly attribute DOMString identifier
The title of the bar.
attribute DOMString label
Setting an empty string, null
, or undefined
has no effect.
A Boolean value that indicates whether the bar is visible.
readonly attribute boolean visible
Hides the bar.
void hide (in boolean doNotRemember);
If true
, new bars with the same identifier should be also be hidden in the future. Defaults to false
.
If the bar is already hidden, does nothing.
Shows the bar.
void show (in boolean doNotRemember);
If true
, new bars with the same identifier should also be shown. Defaults to false
.
If the bar is already being shown, does nothing.
Last updated: 2010-07-13