Class

SafariExtensionBar

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.

Overview

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.

Topics

Bar Visibility

visible

A Boolean value that indicates whether the bar is visible.

hide

Hides the bar.

show

Shows the bar.

Accessing Windows

browserWindow

The browser window containing the bar.

contentWindow

The DOM window object of the bar.

Identifying Bars

identifier

The unique identifier of the bar.

label

The title of the bar.

Relationships

Inherits From