Class

SafariExtensionToolbarItem

Instances of the SafariExtensionToolbarItem represent items that your extension adds to the Safari toolbar. Users can select which toolbar items are shown by selecting Customize Toolbar in the same way that they can add and remove toolbar items provided by Safari.

Topics

Setting Up the Appearance

badge

The current badge number.

image

The URL of the current image.

label

The label of the toolbar item, as shown in the toolbar’s overflow menu.

paletteLabel

The label of the toolbar item, as shown in the Customize palette.

toolTip

The tooltip (help tag) of the toolbar item.

Using Menus and Popovers

menu

The menu associated with this toolbar item.

popover

The popover associated with the toolbar item.

showMenu

Shows the menu for the toolbar item.

showPopover

Shows the popover for the toolbar item.

Handling Click Events

browserWindow

The containing browser window.

command

The command identifier that the toolbar item sends when it is clicked.

disabled

A Boolean value that indicates whether the toolbar item is disabled.

identifier

The unique identifier of the toolbar item.

validate

Dispatches a validate event for this toolbar item.

Relationships

Inherits From