Labs/Jetpack/Reboot/JEP/112: Difference between revisions

Jump to navigation Jump to search
m
Line 47: Line 47:
Adds an item to the context menu.  The position at which the item is inserted is at the discretion of Jetpack.
Adds an item to the context menu.  The position at which the item is inserted is at the discretion of Jetpack.


; context : An object describing the context under which to add the item.  See [[#Specifying Contexts]].
; context : A value describing the context under which to add the item.  See [[#Specifying Contexts]].
; menuitem : The menuitem to add.  See [[#Specifying Menuitems]].
; menuitem : The menuitem to add.  See [[#Specifying Menuitems]].


Line 54: Line 54:
Replaces an existing item in the context menu.  If the target item does not exist, this function silently fails, and the context menu is not modified.
Replaces an existing item in the context menu.  If the target item does not exist, this function silently fails, and the context menu is not modified.


; context : An object describing the context under which to add the item.  See [[#Specifying Contexts]].
; context : A value describing the context under which to add the item.  See [[#Specifying Contexts]].
; target : A value describing the existing item to replace.  See [[#Specifying Existing Menuitems]].
; target : A value describing the existing item to replace.  See [[#Specifying Existing Menuitems]].
; menuitem : The menuitem to add.  See [[#Specifying Menuitems]].
; menuitem : The menuitem to add.  See [[#Specifying Menuitems]].
Line 62: Line 62:
Inserts a new item before an existing one.  If the target item does not exist, this function silently fails, and the context menu not modified.
Inserts a new item before an existing one.  If the target item does not exist, this function silently fails, and the context menu not modified.


; context : An object describing the context under which to add the item.  See [[#Specifying Contexts]].
; context : A value describing the context under which to add the item.  See [[#Specifying Contexts]].
; target : A value describing the existing item before which to insert the new item.  See [[#Specifying Existing Menuitems]].
; target : A value describing the existing item before which to insert the new item.  See [[#Specifying Existing Menuitems]].
; menuitem : The menuitem to add.  See [[#Specifying Menuitems]].
; menuitem : The menuitem to add.  See [[#Specifying Menuitems]].
Confirmed users
764

edits

Navigation menu