Skip to content

Commit

Permalink
Update menus.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
jobisoft committed Feb 20, 2021
1 parent d1827b1 commit f585732
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions menus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ onShown(info, tab)

.. api-section-annotation-hack::

Fired when a menu is shown. The extension can add, modify or remove menu items and call menus.refresh() to update the menu.
Fired when a menu is shown. The extension can add, modify or remove menu items and call ``menus.refresh()`` to update the menu.

.. api-header::
:label: Parameters for event listeners
Expand All @@ -428,7 +428,9 @@ Fired when a menu is shown. The extension can add, modify or remove menu items a
:name: ``info``
:type: (object)

Information about the context of the menu action and the created menu items. For more information about each property, see OnClickData. Some properties are only set if the extension has host permissions for the given context. The message display tab receives host permission through the :permission:`messagesRead` permission, the compose window through the :permission:`compose`.
Information about the context of the menu action and the created menu items. For more information about each property, see :ref:`menus.OnClickData`.

Some properties are only included if the extension has host permission for the given context, for example :permission:`activeTab` for content tabs, :permission:`compose` for compose tabs and :permission:`messagesRead` for message display tabs.

.. api-member::
:name: ``contexts``
Expand Down Expand Up @@ -459,21 +461,21 @@ Fired when a menu is shown. The extension can add, modify or remove menu items a
:name: [``frameUrl``]
:type: (string)

Host permission is needed for ``frameUrl`` to be included.
Host permission is required.


.. api-member::
:name: [``linkText``]
:type: (string)

Host permission is needed for ``linkText`` to be included.
Host permission is required.


.. api-member::
:name: [``linkUrl``]
:type: (string)

Host permission is needed for ``linkUrl`` to be included.
Host permission is required.


.. api-member::
Expand All @@ -485,7 +487,7 @@ Fired when a menu is shown. The extension can add, modify or remove menu items a
:name: [``pageUrl``]
:type: (string)

Host permission is needed for ``pageUrl`` to be included.
Host permission is required.


.. api-member::
Expand All @@ -506,14 +508,14 @@ Fired when a menu is shown. The extension can add, modify or remove menu items a
:name: [``selectionText``]
:type: (string)

Host permission is needed for ``selectionText`` to be included.
Host permission is required.


.. api-member::
:name: [``srcUrl``]
:type: (string)

Host permission is needed for ``srcUrl`` to be included.
Host permission is required.


.. api-member::
Expand Down

0 comments on commit f585732

Please sign in to comment.