Instance Property

image

The URL of the image shown next to the menu item.

Declaration

attribute DOMString image;

Discussion

This attribute can be changed to the URL of an image in the extension bundle. Images larger than 16 x 16 pixels are scaled down to fit. Supported URL schemes are safari-extension, http, and https.

On Windows, if the menu item is checked, the icon is not displayed.

To support HiDPI, provide an image of the appropriate resolution at the same location, with the suffix @2x after its name. For example some/path/image-name@2x.png and some/path/image-name.png provide the same image at high resolution and standard resolution, respectively.

See Also

Working with Menu Items

separator

A Boolean value that indicates whether the menu item is a separator.

title

The title displayed in the menu.

submenu

The submenu displayed by this menu item.