SafariExtensionBar Class Reference
| Inherits from | |
| Technology area | Safari Extensions |
| Availability | Available in Safari 5.0 and later. |
Overview
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.
Properties
browserWindow
The browser window containing the bar.
readonly attribute SafariBrowserWindow browserWindow
Availability
- Available in Safari 5.0 and later.
contentWindow
The DOM window object of the bar.
readonly attribute DOMWindow contentWindow
Availability
- Available in Safari 5.0 and later.
identifier
The unique identifier of the bar.
readonly attribute DOMString identifier
Availability
- Available in Safari 5.0 and later.
label
The title of the bar.
attribute DOMString label
Discussion
Setting an empty string, null, or undefined has no effect.
Availability
- Available in Safari 5.0 and later.
visible
A Boolean value that indicates whether the bar is visible.
readonly attribute boolean visible
Availability
- Available in Safari 5.0 and later.
Methods
hide
Hides the bar.
Parameters
- doNotRemember
If
true, new bars with the same identifier should be also be hidden in the future. Defaults tofalse.
Discussion
If the bar is already hidden, does nothing.
Availability
- Available in Safari 5.0 and later.
show
Shows the bar.
Parameters
- doNotRemember
If
true, new bars with the same identifier should also be shown. Defaults tofalse.
Discussion
If the bar is already being shown, does nothing.
Availability
- Available in Safari 5.0 and later.
© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-07-13)