Safari Developer Library

Developer

SafariExtensionContextMenuItem Class Reference

Options
Deployment Target:

On This Page

SafariExtensionContextMenuItem

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

    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.

  • disabled Property

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

    Declaration

    attribute boolean disabled

    Discussion

    Disabled menu items are not displayed in the context menu.

  • identifier Property

    The unique identifier of the context menu item.

    Declaration

    readonly attribute DOMString identifier

    Discussion

    This attribute is required.

  • title Property

    The title displayed in the context menu.

    Declaration

    attribute DOMString title

    Discussion

    This attribute is required.

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