Safari Developer Library

Developer

SafariExtensionContextMenuItem Class Reference

Options
Deployment Target:

On This Page

SafariExtensionContextMenuItem

Inheritance


Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Availability


Available in Safari 5.0 and later.

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

  • command Property

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

    Declaration

    JavaScript

    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

    Available in Safari 5.0 and later.

  • disabled Property

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

    Declaration

    JavaScript

    attribute boolean disabled

    Discussion

    Disabled menu items are not displayed in the context menu.

    Availability

    Available in Safari 5.0 and later.

  • identifier Property

    The unique identifier of the context menu item.

    Declaration

    JavaScript

    readonly attribute DOMString identifier

    Discussion

    This attribute is required.

    Availability

    Available in Safari 5.0 and later.

  • title Property

    The title displayed in the context menu.

    Declaration

    JavaScript

    attribute DOMString title

    Discussion

    This attribute is required.

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

    Availability

    Available in Safari 5.0 and later.