Instance Property

bars

All of the bars provided by the target extension.

Declaration

readonly attribute array bars;

Discussion

An instance of the SafariExtensionBar class represents a bar that your extension provides. Each instance of a bar in this property array belongs to a single extension. A bar typically appears below Safari's address bar and the Favorites bar. An extension can add any number of bars to Safari. Adding bars is optional. If there are no SafariExtensionBar instances provided by the extension, the array is empty. The native Safari bars are not affected.

If multiple windows are open, there might be duplicate bars in the array. Each instance of a bar is indexed for every instance of SafariBrowserWindow the bar appears in. When updating a bar, you should update it in every window.

See Also

Working with Extensions

baseURI

The URI that corresponds to the root of the extension’s bundle.

globalPage

The extension’s global page, or null if the extension doesn’t have a global page.

toolbarItems

All of the toolbar items of an extension.