SafariExtensionContextMenuItem Class Reference

Inherits from
Technology area
Safari Extensions
Availability
Available in Safari 5.0 and later.

Overview

Instances of the SafariExtensionContextMenuItem class represent individual menu items within an extension’s context menu.

Tasks

Setting Up a Menu Item

Properties

command

The command identifier that the context menu item sends when activated.

attribute DOMString command
Discussion

Setting an empty string, null, or undefined has no effect.

This attribute is optional; the value defaults to the value of identifier.

Availability

disabled

A Boolean value that indicates whether a context menu item is disabled.

attribute boolean disabled
Discussion

Disabled menu items are not displayed in the context menu.

Availability

identifier

The unique identifier of the context menu item.

readonly attribute DOMString identifier
Discussion

This attribute is required.

Availability

title

The title displayed in the context menu.

attribute DOMString title
Discussion

This attribute is required.

Setting an empty string, null, or undefined has no effect.

Availability